|
Subject: Re: [xsl] lookup table From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Thu, 18 Jul 2002 22:46:50 +0200 |
Yes.
Can I have a static lookup table *inside* my xsl stylesheet?
Something like
<xsl:stylesheet>
<definitions> <term name="GMT">Greenwich Mean Time</term> <term name="MST">Mountain Standard Time</term> </definitions>
<xsl:template> <xsl:value-of select="document()//definitions[@name='GMT']"/> </xsl:template>
Some corrections: 1. elements which don't belong to the XST namespace are allowed as direct children of xsl:stylesheet as long as they are put into another namespace 2. the stylesheet itself is adressed as document('')
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:data="urn:some.urn" exclude-result-prefixes="data">
<data:definitions>
<term name="GMT">Greenwich Mean Time</term>
<term name="MST">Mountain Standard Time</term>
</data:definitions> <xsl:template>
<xsl:value-of select="document('')/*/data:definitions[@name='GMT']"/>
</xsl:template>
...| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] lookup table, Guy McArthur | Thread | RE: [xsl] lookup table, Américo Albuquerque |
| Re: [xsl] Non-well-formed HTML in X, J.Pietschmann | Date | Re: [xsl] XSL-FO Vertical Text Orie, J.Pietschmann |
| Month |