[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: lookup table

Subject: RE: lookup table
From: "Américo Albuquerque" <aalbuquerque@xxxxxxxxxxxxxxxx>
Date: Fri, 19 Jul 2002 14:15:15 +0100
greenwich mean time lookups
I supose that what you want is <xsl:value-of
select="document()//definitions/term[@name='GMT']"/>, wright?

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
J.Pietschmann
Sent: Thursday, July 18, 2002 9:47 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  lookup table


Guy McArthur wrote:
>
> Can I have a static lookup table *inside* my xsl stylesheet?
Yes.

> 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('')

Therefore, try

<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>
  ...

J.Pietschmann


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.