XSL : reference to another XML file


2008-02-28 11:50:56 PM
delphi65
Hi,
Not really a Delphi problem, but you all surely knows much more XML as
I do :-)
1. I have an XSL file in which I put a value into a var ->$loc
2. The @code value returned is ok ( $loc = 100013 )
3. I am now searching a mapped value (val) in another XML file
1. <xsl:variable name="loc" select="subfield[@code='D']"/>
2. <!-- <xsl:value-of select="$loc"/>-->
3. <xsl:value-of
select="document('locationcodes.xml')//val[@codel=$loc]"/>
Nothing comes back.
If I am using the litteral value, the returned value is ok.
3. <xsl:value-of
select="document('locationcodes.xml')//val[@codel='100013']"/>
Any idea?
Thanks
JP