|
Subject: RE: [xsl] Global, dynamically-named variables (or equiv) in XSL From: "Robert Koberg" <rob@xxxxxxxxxx> Date: Thu, 19 Jun 2003 12:56:57 -0700 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Global, dynamically-named, David Carlisle | Thread | Re: [xsl] Global, dynamically-named, Mark Miller |
| Re: [xsl] Global, dynamically-named, David Carlisle | Date | [xsl] how does xml/xsl handle the &, dmitrik@xxxxxxxxxxxx |
| Month |