[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XPath for comparing different files

Subject: XPath for comparing different files
From: "Robert Soesemann" <rsoesemann@xxxxxxxxxxx>
Date: Mon, 5 Jul 2004 13:11:50 +0200
xpath sitemap
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.