XSL Processing
This may be a dumb question, but is it possible to apply a style based on
a tag's parameters ?
For example, I have an XML doc in the format:
<book>
<section indent="1" title="Section 1">Section 1 blah blah blah</section>
<section indent="2" title="Section 1.1">Section 1.1 words</section>
<section indent="2" title="Section 1.2">Section 1.2 words</section>
</book>
And I want to set font properties/indents based on the 'indent' parameter.
Any help would be greatly appreciated.
T.
[609 byte] By [
Tony] at [2007-11-9 15:22:58]

# 1 Re: XSL Processing
That is very easy to do with XSL. It would look something like this
<xsl:for-each select="//section">
<xsl:choose>
<xsl:when test="@indent = '1'">
Do something here
</xsl:when>
<xsl:when test="@indent = '2'">
Do something different here
</xsl:when>
</xsl:choose>
</xsl:for-each>
I hope that helps out.
"Tony" <tony_southworth@triangle-group.com> wrote:
>
>This may be a dumb question, but is it possible to apply a style based on
>a tag's parameters ?
>
>For example, I have an XML doc in the format:
>
><book>
><section indent="1" title="Section 1">Section 1 blah blah blah</section>
><section indent="2" title="Section 1.1">Section 1.1 words</section>
><section indent="2" title="Section 1.2">Section 1.2 words</section>
></book>
>
>And I want to set font properties/indents based on the 'indent' parameter.
>
>Any help would be greatly appreciated.
>
>T.
# 2 Re: XSL Processing
Steven - need to get my head around this parameters == nodes idea.
Thanks for your help.
T.
"Steven Sexton" <asuman71@hotmail.com> wrote:
>
>That is very easy to do with XSL. It would look something like this
>
><xsl:for-each select="//section">
> <xsl:choose>
> <xsl:when test="@indent = '1'">
> Do something here
> </xsl:when>
> <xsl:when test="@indent = '2'">
> Do something different here
> </xsl:when>
> </xsl:choose>
></xsl:for-each>
>
>
>I hope that helps out.
>
>"Tony" <tony_southworth@triangle-group.com> wrote:
>>
>>This may be a dumb question, but is it possible to apply a style based
on
>>a tag's parameters ?
>>
>>For example, I have an XML doc in the format:
>>
>><book>
>><section indent="1" title="Section 1">Section 1 blah blah blah</section>
>><section indent="2" title="Section 1.1">Section 1.1 words</section>
>><section indent="2" title="Section 1.2">Section 1.2 words</section>
>></book>
>>
>>And I want to set font properties/indents based on the 'indent' parameter.
>>
>>Any help would be greatly appreciated.
>>
>>T.
>
Tony at 2007-11-11 23:31:17 >
