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 Monday, 4 February 2002 08:34:45 UTC