Hello!
I have a problem while trying to refer from a file called by the
document function to the document where it was called from. I give an
example:
<filelist>
<file name="whatever">
<url>foo/bar/somefile.xml</url>
</file>
<!-- ... -->
</filelist>
Now I call this template:
<xsl:template match="filelist">
<xsl:for-each select="file">
<xsl:apply-templates select="document(url)//xyz"/>
</xsl:for-each>
</xsl:template>
Now I want the "xyz" template to get the "name" value of "file". I
tried the following (with Saxon 7.9.1), but apparently I can't reach
out of the document that has been called with "document()".
<xsl:template match="xyz"
<!-- do some stuff -->
<xsl:value-of select="ancestor::file/@name"/>
</xsl:template>
How can I call a value from the original document, at the specific
node from where the "document()" call took place?
Bye,
Boris