This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: retrieving a piece of data from a different xml file
- To: <xsl-list at mulberrytech dot com>
- Subject: RE: retrieving a piece of data from a different xml file
- From: "Chris Bayes" <Chris at Bayes dot co dot uk>
- Date: Tue, 1 Aug 2000 20:18:51 +0100
- Reply-To: xsl-list at mulberrytech dot com
<xsl:variable name="locs" select="document('pagelocations.xml')">
</xsl:variable>
later
<xsl:template match="link">
<a>
<xsl:atribute name="href"><xsl:value-of
select="$locs/pagelocations/item[@name = @page]/location" /></xsl:attribute>
</a>
</xsl:template>
Comes to mind but I haven't tried it.
Ciao Chris
>-----Original Message-----
>From: owner-xsl-list@mulberrytech.com
>[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Eric Taylor
>Sent: 01 August 2000 19:36
>To: 'XSL-List@mulberrytech.com'
>Subject: retrieving a piece of data from a different xml file
>
>
>in mainfile.XML (the one I'm primarily displaying info from), I have a tag
>like this:
>
> <link page="B".../>
>
>in pagelocations.XML, I have something like this:
>
> <pagelocations>
> <item name="A" location="path\filename"/>
> <item name="B" location="path\filename"/>
> ...
> </pagelocations>
>
>in my XSL, when I match <link>, I want to look in
>pagelocations.xml and find
>the item where item[@name]=@page and then use @location from that item. I
>have no clue how to do this. Thanks from a still-stumbling novice. Eric
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list