This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Style Rules for Mixed Elements
> I would like to write an xsl style rule that would format elements inside
> the Para element with a color, for example, while leaving the "text" of the
> Para element alone.
That's the default behaviour, just have
<xsl:template match="Para/Menu">
<green>
<xsl:apply-templates/>
</green>
</xsl:text>
> Then I could do
>
> <xsl:for-each>
> <xsl:apply-template select="Menu"/>
> <xsl:for-each>
>
> in my Para rule.
No, you don't want to do that. It's invalid as it stands,
but even if you added a select attribute for the for-each
it would not do what you want.
You just want to have a
<xsl:apply-templates/>
This will apply templates to all the text and element node childeren in
order, the text will by default just appear and the menu nodes
will get surrounded by ,green> or whetver markup you want.
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list