simonchristieis
Programmer
I am trying to get back to the root of a document using the current() function, can anyone help ?
xml
DataIsland.xsl
template
Thanks in advance
xml
Code:
<Root>
<node1>
<node2/>
</node1>
</Root>
DataIsland.xsl
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:edi="[URL unfurl="true"]http://">[/URL]
<edi:test type="node1" value="foobar"/>
</xsl:stylesheet>
template
Code:
<xsl:template match="node2">
<!-- this works -->
<xsl:value-of select="document('DataIsland.xsl')/xsl:stylesheet/edi:test[@type='node1']/@value"/>
<!-- but i want to do something like this -->
<xsl:value-of select="document('DataIsland.xsl')/xsl:stylesheet/edi:test[@type=name(current()Root/*)]/@value"/>
</xsl:template>
Thanks in advance