Subject: RE: [xsl] match nodes based on given path From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx> Date: Fri, 11 Apr 2003 13:12:50 +0100 |
> how about generating multiple templates for the different locators, > somthing like of course! sometimes things are so obvious (after... uh... I know the answer :) If I am generating the stylesheet the solution wont involve keys or a nodeset, just a set of templates generated from the given node-set: <xsl:template match="/root/node/foo"> <xsl:call-template name="special"> <xsl:with-param name="nodeset"> <locator file=... path="... /> <locator file=... path="... /> </xsl:template> <sigh/> good job its friday cheers andrew > -----Original Message----- > From: David Carlisle [mailto:davidc@xxxxxxxxx] > Sent: 11 April 2003 12:41 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: [xsl] match nodes based on given path > > > > > As Im generating the stylesheet I can do pretty much anything, but I > > cant see how to do it using the key approach. > > how about generating multiple templates for the different locators, > somthing like > > <xsl:key name="fooLink" match="/root/node/foo" use="generate-id()"/> > > <xsl:template match="*[generate-id() = > generate-id(key('fooLink',generate-id()))]"> > <xsl:call-template name="IndyLink"> > <xsl:with-param name="locator" select="'test1.xml'" > ... > > <xsl:key name="barLink" match="/root/node/bar" use="generate-id()"/> > > <xsl:template match="*[generate-id() = > generate-id(key('barLink',generate-id()))]"> > <xsl:call-template name="IndyLink"> > <xsl:with-param name="locator" select="'test2.xml'" > ... > > > <xsl:key name="bazLink" match="/root/node/foo" use="generate-id()"/> > > <xsl:template match="*[generate-id() = > generate-id(key('bazLink',generate-id()))]"> > <xsl:call-template name="IndyLink"> > <xsl:with-param name="locator" select="'test3.xml'" > ... > > ______________________________________________________________ > __________ > 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 > > > > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.470 / Virus Database: 268 - Release Date: 08/04/2003 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.470 / Virus Database: 268 - Release Date: 08/04/2003 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] match nodes based on give, David Carlisle | Thread | [xsl] nodes having same values in s, Leena Kulkarni |
RE: [xsl] Self index?, David . Pawson | Date | [xsl] Using XSLT within VB.net?, Kathy Burke |
Month |