[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
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
|
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
|