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

RE: Searching in Sub-children from an Array

Subject: RE: Searching in Sub-children from an Array
From: "Houman Khorasani" <Houman.Khorasani@xxxxxxxxxxx>
Date: Tue, 5 Dec 2006 16:17:52 -0000
RE:  Searching in Sub-children from an Array
Many thanks. This has helped me getting forward.

Houman

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: 04 December 2006 16:36
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Searching in Sub-children from an Array


in xslt2 something like

 <xsl:key name="ids" match="*" use="@ID"/>

<xsl:template match="Steps">
 <xsl:variable name="ids" select="tokenize(.,',\s*')"/>
 <xsl:apply-templates mode="step" select="key('ids',$ids[1])[1]">
   <xsl:with-param name="ids" select="$ids[position()!=1]"/>
  </xsl:apply-templates>
</xsl:template>

<xsl:template mode="step" match="*">
 <xsl:param name="ids"/>
 do something with this node then
  <xsl:apply-templates mode="step" select="key('ids',$ids[1],.)[1]">
   <xsl:with-param name="ids" select="$ids[position()!=1]"/>
  </xsl:apply-templates>
</xsl:template>

David

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-2011 All Rights Reserved.