|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Document function (was Getting an error with a va
>>>>> "Garry" == Garry Searle <garry@xxxxxxxxxxxxxxxxxx> writes:
Garry> Thanks Colin I looked into the document function and got it
Garry> working. The xml file will always be the same, so no need
Garry> to pass the url in a parameter. This is a snippet of
Garry> code. Am I on the right track or is there a more efficient
Garry> way?
Garry> <xsl:for-each
Garry> select="/legs/competition/leg/Competitor[../../@name=$paramVal1]">
Garry> <tr> <td><xsl:value-of select="@no"/></td> <xsl:variable
Garry> name="cNum"> <xsl:value-of select="@no"/> </xsl:variable>
Garry> <td><xsl:value-of
Garry> select="document('EntryList.xml')/entrylist/competition/entry/@driverSurname
Garry> [../@no=$cNum]"/> <td><xsl:value-of
Garry> select="document('EntryList.xml')/entrylist/competition/entry/@coDriverSurna
Garry> me[../@no=$cNum]"/> <td><xsl:value-of
Garry> select="@stageTime"/> </td> <td><xsl:value-of
Garry> select="@penaltyTime"/> </td> <td><xsl:value-of
Garry> select="@totalTime"/> </td>
I don't know about whether or not it would be more efficient, but I
would set a variable for the common path expression document('EntryList.xml')/entrylist/competition/entry.
--
Colin Adams
Preston Lancashire
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. 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
|







