|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Document function (was Getting an error with a variabl
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@xxxxxxxxxxxxxxxxxx] Sent: Saturday, 29 July 2006 4:13 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Getting an error with a variable >>>>> "Garry" == Garry Searle <garry@xxxxxxxxxxxxxxxxxx> 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
|
Back To School Sale!Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop. 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
|






