W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2002

RE: XSL and XML schema

From: Mani Doraisamy <MDoraisamy@SELECTICA.com>
Date: Mon, 4 Feb 2002 08:49:35 -0500 (EST)
Message-ID: <D2B8F479C42D604DB260D23421AAF46A14E581@chennai-mail.selectica.com>
To: Jeni Tennison <jeni@jenitennison.com>
Cc: xmlschema-dev@w3.org
thanks Jeni.

Right now i am putting the list of values as an attribute of that node 
separated by | symbol.

<icecream domain="vanilla|chocolate|strawberry">chocolate</icecream>

Then i use xsl substring to parse the attribute value and show it in 
the select box.
Can you suggest me a better alternative which avoids overhead/cumbersome
coding. (How about inline xml schema ?)

mani



-----Original Message-----
From: Jeni Tennison [mailto:jeni@jenitennison.com]
Sent: Monday, February 04, 2002 5:35 AM
To: Mani Doraisamy
Cc: xmlschema-dev@w3.org
Subject: Re: XSL and XML schema


Hi Mani,

> This is a general question on XSL.
>
> Can i access an XML node's property which will be described in the
> XML schema/DTD from the XSL ?

Not in XSLT 1.0. It seems likely that XSLT 2.0 (or more accurately
XPath 2.0) will provide some access to the schema associated with a
document, but it's not clear from the current Working Drafts what will
be accessible and what will not be accessible.

> For example, in the xml schema if i define that a node can have a
> value from a list of values (tokens), i need to show the list of
> values in the select box, from which i can select one of those
> values as node value.
>
> So to show the select box which i will do it in XSL, i need to
> access DTD/Schema to get the list of values

I *think* that it's unlikely that you will get this functionality in
XSLT 2.0, but I recommend that you write to
www-xml-query-comments@w3.org and www-xpath-comments@w3.org describing
your requirement - you never know.

In XSLT 1.0, or if they don't provide this functionality in XSLT 2.0,
you need to access the schema document as an XML document and traverse
it in the same way you would any other XML document.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Tuesday, 5 February 2002 03:55:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT