|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] variable in xpath
I have two xml files with exactly similar hierarchy, but for a few
different element nodes. Something like the following:
File1.xml
<element>
<child>
<a>
<b>
</child>
</element>File2.xml
<element>
<child>
<a>
<adesc>
</a>
</child>
</element>I have a variable $path that holds an element's (in File1) xpath as if it was assinged by one the following: <xsl:variable name="path" select="'element/child/a'"/> How do I obtain and copy the node <adesc> of File2 using the above $path variable? Something like the below one: <xsl:template match="node()"> <xsl:copy-of select="document(File2.xml)/$path.."/> </xsl:template> Output has to be smth like this:
<element>
<child>
<a>
<adesc>
</a>
<b>
</child>
</element>Thanks, Kalyan 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








