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

matching certain attributes in other xml files with th

Subject: matching certain attributes in other xml files with the document() function
From: chriss.barth@xxxxxx
Date: Fri, 9 May 2003 17:06:15 +0200 (MEST)
xsl th
hi y'all!

i want to test if the value of a variable ('object-id') of my xml file which
is processed by the stylesheet matches the id-parameter of another xml file
('foo.xml'). 
if it´s true. i´d like to get the value of the 'xlink:href' attribute in
foo.xml and store it as a variable ('doc-id').

my attempt was the following:
<xsl:variable name="object-id" select="child::object-id"/>
<xsl:variable name="doc" select="document('foo.xml')"/>
<xsl:variable name="doc-id"
select="$doc/root/object[@id=$object-id]/path[@xlink:href]"/>

here is the xml file 'foo.xml':
<root>
<object id="090f428d800073a8">
<path xlink:type="locator" xlink:href="someDocument.htm"/>
</root>

i can´t understand why $doc-id doesn´t have any value. 
if i write: <xsl:variable name="doc-id" select="$doc//@id"/> 
the return is the id parameter ('090f428d800073a8') of the object element in
foo.xml, but i can´t test if it matches my $object-id.
this way is also incorrect:
<xsl:value-of
select="document('foo.xml')/root/object[@id=$object-id]/path[@xlink:href]"/>

any ideas of how to get that problem solved?
thanks in advance.

christian

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.