[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: alternative for modes
Imagine this function can be called on a tag <root> and <child> is a child of that tag. So each time when 'generalTemplate' is called, a template which matches the tag 'child' will be called too: OK, although xslt can't see any tags in the document, and tags dont have children (and tags are not the same thing as elements) < xsl:template match="child"> <xsl:if test="$p = 'situation1'> If situation is deducable from the context of the child element node then a common idiom is to have <xsl:template match="foo/child">... <xsl:template match="bar/child">... <xsl:template match="child[x=y]" priority="2">... and then you just need <xsl:apply-templates/> in your calling template. David -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|