[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] returning to initial document after changing context v
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[@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="{@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
|
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
|