|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: match nodes based on given path
> 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: 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
|
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
|

Cart








