Subject: Re: [xsl] Can xsl:key use a globally declared variable? From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 16 Nov 2018 15:53:17 -0000 |
I declare a variable to hold the airports document:
<xsl:variable name="airport-file" select="doc('airports.xml')"/>
I declare an xsl:key to index the rows, using the <icao> element to identity the desired <row>:
<xsl:key name="airports-with-icao" match="$airport-file/airports/row" use="icao"/>
In a template I declare a variable to hold the icao of the desired airport:
<xsl:variable name="airport-icao" select="'KBOS'"/>
I use the key() function to obtain the desired <row>:
<xsl:sequence select="key('airports-with-icao', $airport-icao)" />
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Can xsl:key use a globally de, Costello, Roger L. c | Thread | [xsl] Does anyone know of an XSLT c, Trevor Nicholls trev |
[xsl] Can xsl:key use a globally de, Costello, Roger L. c | Date | [xsl] Does anyone know of an XSLT c, Trevor Nicholls trev |
Month |