After having used the document function to get some node details from a
config document, i need to return to the base document to continue
processing. However, even though I have given an absolute path reference
in the for-each statement, it seems to still be looking in the config
document.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:vbtn="http://www.virusbtn.com/namespaces/documents/issue/1.0/"
xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:html="http://www.w3.org/1999/xhtml">
<xsl:output method="xml" indent="yes"/>
<xsl:variable name="autodate"
select="document('/global/autodate.xml')/date"/>
<xsl:variable name="month" select="$autodate/month[(_at_)position =
/vbtn:article/vbtn:metadata/prism:number ]/@name"/>
<xsl:variable name="index"
select="document('/articles/virusbulletin/index.xml')/articles"/>
<xsl:key name="articles" match="@filename" use="."/>
<xsl:template match="/">
<!-- article heading -->
<h1>
<xsl:value-of
select="/vbtn:issue/vbtn:metadata/prism:publication"/>: <xsl:value-of
select="/vbtn:issue/vbtn:metadata/prism:volume"/>
</h1>
<xsl:for-each select="$index/category">
<section name="{(_at_)name}">
<xsl:for-each select="/vbtn:issue/vbtn:content/vbtn:article">
<xsl:value-of select="@id"/>
<br/>
</xsl:for-each>
</section>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
so <xsl:for-each select="/vbtn:issue/vbtn:content/vbtn:article"> should be
referencing the original document rather than the config document. Is
there a special function to return the context to the base document?
--
Tom David Kirkpatrick
Virus Bulletin Web Developer, Virus Bulletin
Tel: +44 1235 555139
Web: www.virusbtn.com
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--