Subject: [xsl] 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) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] saxon command line tool w, J.Pietschmann | Thread | Re: [xsl] matching certain attribut, David Carlisle |
RE: [xsl] [saxon] unwanted line bre, me | Date | [xsl] Problem solution with IE5.5, Fran |
Month |