[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Style Rules for Mixed Elements

Subject: Re: Style Rules for Mixed Elements
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 10 Jul 2000 16:02:55 +0100 (BST)
xsl style rule
> 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.