Subject: Re: [xsl] lookup table From: Guy McArthur <guym@xxxxxxxxxxxxxxx> Date: Tue, 23 Jul 2002 10:52:05 -0700 (MST) |
> > Can I have a static lookup table *inside* my xsl stylesheet? > > <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> > ... > What I'm doing is select="document('')/*/data:definitions/term[@name = name()]" (where the attribute matches the node name). The input is like: <times> <mst>some time value</mst> <utc>another time value</utc> </times> But it doesn't work! Everything else is as you suggested. Are @name and name() comparable as strings? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] lookup table, Américo Albuquerque | Thread | Re: [xsl] lookup table, Joerg Heinicke |
Re: [xsl] Dynamic XSL Sorting - Is , Joerg Heinicke | Date | Re: [xsl] lookup table, Joerg Heinicke |
Month |