Thanks Colin
I looked into the document function and got it working. The xml file will
always be the same, so no need to pass the url in a parameter. This is a
snippet of code. Am I on the right track or is there a more efficient way?
<xsl:for-each
select="/legs/competition/leg/Competitor[../../@name=$paramVal1]">
<tr>
<td><xsl:value-of select="@no"/></td>
<xsl:variable name="cNum">
<xsl:value-of select="@no"/>
</xsl:variable>
<td><xsl:value-of
select="document('EntryList.xml')/entrylist/competition/entry/@driverSurname
[../@no=$cNum]"/>
<td><xsl:value-of
select="document('EntryList.xml')/entrylist/competition/entry/@coDriverSurna
me[../@no=$cNum]"/>
<td><xsl:value-of select="@stageTime"/> </td>
<td><xsl:value-of select="@penaltyTime"/> </td>
<td><xsl:value-of select="@totalTime"/> </td>
Thanks
Garry
-----Original Message-----
From: Colin Paul Adams [mailto:colin(_at_)colina(_dot_)demon(_dot_)co(_dot_)uk]
Sent: Saturday, 29 July 2006 4:13 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Getting an error with a variable
"Garry" == Garry Searle <garry(_at_)justimagine(_dot_)com(_dot_)au>
writes:
Garry> I'm wanting to combine 2 xml files. One has a list of car
Garry> number and competitor names, the other is a list of
Garry> times. Essentially a relational database. I use .asp to
Garry> pass the xml and xsl files. Is it possible to pass 2 xml
Garry> files, or how can I access the data from the 2nd xml
Garry> file. Could you point me to some documentation. I havent
Garry> been able to find anything.
You could pass the URI of the second file as a stylesheet parameter.
Then use the document() function.
--
Colin Adams
Preston Lancashire
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--