Subject: [xsl] RE: xsl which template From: Matt Elder <M.Elder@xxxxxxxxxxxxxxxxxxxxx> Date: Thu, 22 Feb 2001 08:42:32 +1000 |
> That is, I'd like to apply 2 different templates to the SAME xml file. Mike Kay suggested using JScript but an alternative would be to use a combination of template matches and call templates. ie Sample XML <root> <level1> <level2></level2> </level1> <level1> <level2></level2> </level1> </root> Sample XSL <xsl:apply-templates select="root/level1"/> <xsl:call-template name="JoeBloggs"/> <xsl:template match="level1"> <!-- some form of processing --> </xsl:template> <xsl:template name="JoeBloggs"> <!-- some form of processing --> </xsl:template> Thus in one template you can carry out processing on the XML and in the named template you can do something else. Saves having to use JScript. Just a thought Matt www.mattelder.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] sort question, Hahn, Kimberly | Thread | [xsl] JavaScript Patterns, ward . ct |
RE: [xsl] Choose-When-Otherwise Nes, Scott Downie | Date | [xsl] JavaScript Patterns, ward . ct |
Month |