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

RE: processing source XML while inside variable proce

Subject: RE: processing source XML while inside variable processing - XSLT 1.0
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 10 May 2006 10:50:33 +0100
inside variable
The basic rule is that if you're manipulating more than one document (tree)
at once, then rather than relying on the context node (of which there can
only be one), you need to bind variables to the different nodes you are
interested in, and refer to them by means of variable references.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: news@xxxxxxxxxxx [mailto:news@xxxxxxxxxxx] 
> Sent: 10 May 2006 10:01
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  processing source XML while inside variable 
> processing - XSLT 1.0
> 
> Hello List,
> 
> I've a variable which I process inside a template. While 
> processig this variable I want to get data from the source 
> XML document, applying templates.
> 
> <xsl:for-each select="$theVariable">
>  <!-- some code here -->
>   <xsl:apply-template select="aNodeInsideTheSourceDocument" />
>   
>  <!-- some more code here -->
> </xsl:for-each>
> 
> The problem is, that while processing the variable 
> "theVariable" with "xsl:for-each", the "apply-templates" 
> command searches for "aNodeInsideTheSourceDocument" inside 
> "theVariable" but not as required inside the source XML document.
> 
> Is there any way to process the source document whily 
> processing a variable with XSLT 1.0?
> 
> Thanks & with best regards,
> Jan

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