[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPath for comparing different files
Hello, I am working on an xsl to create a breadcrumb trail on a page based on an XMl-formated sitemap. In the XML file where I want to render the breadcrumb I look for elements like this: <breadcrumb pageid="XYZ"/> Then I search for a <page id="XYZ" .../> node which id attribute is the same as the "pageid" attribute of the breadcrumb. THE PROBLEM IS: I dont' know how to compare the @id of the sitemap's <page> node and the <breadcrumb>'s @pageid attribute in the select of line 6. Right now the XSL is looking for @pageid in the sitemap file instead inside the <br Thats what my XSL looks like: 1: ... 2: - TODO: externalize sitemap url as application-specific parameter for breadcrumb.xsl --> 3: xsl:variable name="sitemap-nodes" select="document('sitemap.xml')"/> 4: 5: xsl:template match="breadcrumb"> 6: <xsl:variable name="current-page" select="$sitemap-nodes//page[@id = @pageid]"/> 7: .... ^^^^^^^^^^^^^^^^^^^ ||||||||||||||||||| Thank for your help and best regards, Robert S
|
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
|