RE: XSL and XML schema

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 UTC