From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com]
My preferred way to do lookups is to make it table driven:
I _amost_ suggested that... :-) :-)
<xsl:variable name="table">
<entry code="3" value="foo"/>
<entry code="4" value="bar"/>
</xsl:variable>
<xsl:template match="dictionary">
<xsl:value-of select="$table/entry[(_at_)code=current()/@lookup]/@value"/>
</xsl:template>
Needs the xx:node-set() extension or the document("") cheat if using XSLT
1.0.
Why do you need the node-set() extension for that?
~ml
--~------------------------------------------------------------------
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>
--~--