Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How to use elements which belong to another node-set?

From: jim@-----------.---------.---
To: NULL
Date: 2/3/2005 7:53:00 AM
Thanks a lot, Joris.


"Joris Gillis" wrote:

> Tempore 16:23:07, die Thursday 03 February 2005 AD, hinc in foro {microsoft.public.xsl} scripsit jim <jim@d...>:
> 
> > So, for the first <xsl:for-each>, I can get value of TimeStamp/@val which is
> > belong the first node-set, No problem. After entering second <xsl:for-each>
> > which it bring the second node-set, so my question is: How can I use the
> > elements which is belong to the first node-set within the second
> > <xsl:for-each> or within the second node-set context?
> Hi,
> 
> In xslt1.0, you can store node-sets in variables.
> So you could use e.g.:
> 
> <xsl:for-each select="/Inventory/InventoryItem">
>    <xsl:element name="FromInventory">
>       <xsl:value-of select="TimeStamp/@val" />
>    </xsl:element>
>   <xsl:variable name="node-set1" select="."/>
> 
>    <xsl:for-each select="$fielddef/type[@name='Resp_Inventory']/field">
>       <xsl:element name="Inventory2">
>          <xsl:value-of select="$node-set1/TimeStamp/@val" />
>       </xsl:element>
>    </xsl:for-each>
> 
> </xsl:for-each>
> 
> 
> regards,
> -- 
> Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
> "Et ipsa scientia potestas est"  - Francis Bacon , Meditationes sacrae
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent