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

RE: Global, dynamically-named variables (or equiv) in

Subject: RE: Global, dynamically-named variables (or equiv) in XSL
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Thu, 19 Jun 2003 12:56:57 -0700
RE:  Global
Hi,

I don't know what you are trying to do but taking a stab, I would say you
want to set a key:

<xsl:key name="types" match=" xs:simpleType | xs:complexType" use="@name"/>

Forget about the variable try. Simply match the xs:element and get the base
datatype there through the key:

<xsl:template match="xs:element">
  <xsl:value-of select="key('types', @type)/xs:restriction/@base"/>
</xsl:template>

Does that do it for you?

Best,
-Rob


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-
> list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mark Miller
> Sent: Thursday, June 19, 2003 12:00 PM

> Hi,
> 
> I'm working with an XML Schema document (.xsd), and I'm having trouble
> dealing with the idea of types and references to them.  My example xsd
> (from w3schools) creates several named types, e.g.
> 
> <xs:simpleType name="stringtype">
>  <xs:restriction base="xs:string"/>
> </xs:simpleType>
> 
> which are then referenced elsewhere in the document like this:
> 
> ...
>   <xs:element name="orderperson" type="stringtype"/>
> ...
> 



 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.