xsl:key with variables in match
Added by Anonymous about 19 years ago
Legacy ID: #3397664 Legacy Poster: Horst (hgaussma)
Hello, i'am trying to speed up some xslt's and i want to use the xsl:key tag to accomplish this. Now there is one problem for me. How kann i use a document loaded with the document function into a variable to create a key on the elements inside of the loaded document. Or better are there any other methods to do something like that. I tried something like: <xsl:variable name="types" select="document($mytypes)"/> <xsl:key name="typekey" match="$types/mytypes" use="@name"/> or <xsl:key name="typekey" match="document($mytypes))/mytypes" use="@name"/> but always getting a syntax error. Is there any way to speed up access.... thx for light...
Replies (1)
RE: xsl:key with variables in match - Added by Anonymous about 19 years ago
Legacy ID: #3397890 Legacy Poster: Michael Kay (mhkay)
Just use <xsl:key name="typekey" match="mytypes" use="@name"/> The key definition applies to all documents: the actual document used for retrieval is determined when you call the key() function. Michael Kay PS: this is a general XSLT question, nothing specific to Saxon, so it's better to ask it on the xsl-list at mulberrytech.com
Please register to reply