xsl-list
[Top] [All Lists]

Re: XSLT transformation flow based upon data type (access schema from within XSLT?)

2002-10-18 15:28:30
Hi Adam,

Essentially: how do I get the XSLT to "see" the data type of a node?

I'm afraid that unextended XSLT 1.0 doesn't support working out the
data type of a node, especially not as specified in a schema
(unsurprisingly since XML Schema, which I assume is what you're using,
didn't come out until May 2001, whereas XSLT 1.0 was finalised in
November 1999).

If you're using MSXML4, it has a bunch of extension functions that
give you access to schema information, such as:

  - ms:type-is()
  - ms:type-local-name()
  - ms:type-namespace-uri()

XSLT 2.0, which is currently being specified, *does* support accessing
information from the schema -- when the source node tree is created,
each element and attribute is annotated with its schema-defined type.
There's a basic implementation of XSLT 2.0 in Saxon 7.2, but I don't
think that it includes schema support as yet.
  
Because we're currently in the process of developing XSLT 2.0, it
would be really helpful to us if you'd write up what you're trying to
do -- what you think *should* work -- so that we can test that what
we've got planned will meet your requirements (feel free to send it
here to XSL-List, to me privately or to public-qt-comments(_at_)w3(_dot_)org).

Or please have a look at the XPath 2.0 and XSLT 2.0 WDs at:

  http://www.w3.org/TR/xpath20
  http://www.w3.org/TR/xslt20

to see if what's described there would meet your needs. Bear in mind
that they're just drafts, but that's why input from people like
yourself is particularly important.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>