|

January 27th, 2010, 10:33 AM
|
|
Authorized User
|
|
Join Date: Jan 2009
Posts: 36
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
document function
I have the following 2 files
test1.xml and test2.xml
test1.xml is the input to the xsl.
i'm doing the following
Code:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="source" select="'test2.xml'"/>
<xsl:template match="/">
<TEST>
<xsl:apply-templates select="document($source)//output/loc/rsktyp[@key='ABC']"/></TEST>
</xsl:template>
<xsl:template match="rsktyp[@key='ABC']">
<rsks>
<objectID>0</objectID>
<date><xsl:value-of select="date"/></date>
<value><xsl:value-of select="value1"/></value> <!-- want to get value1 from test1.xml -->
</rsks></xsl:template></xsl:stylesheet>
test1.xml
<return>
<objectID>21288381</objectID>
<branch>UC</branch>
<branchId>6010</branchId>
<rsk>
<type>ABC</type>
<value1>100.00</value1>
</rsk>
</return>
test2.xml
<output>
<loc>
<rsktyp key='ABC'>
<objectId>123456</objectId>
<date>12-02-2010</date>
</rsktyp>
</loc>
</output>
can you tell me how i get value1 from test1.xml ?
thanks
|