[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Types and Context
Simon St.Laurent wrote: > > > > sure. what we still need is a processable incarnation of the "PSVI". no such > > thing exists today. you are basically saying that "if we had an API which > > provides access to the information in the PSVI then we could easily do > > this." > > Better still, a usable XML representation of the PSVI. Then we could > use existing XML tools on the PSVI without needing to add all kinds of > PSVI-only tools to the system. > > I'd really like to have a viable route that isn't an API... > Let's not get too afraid of this so-called 'API', I am suggesting that this amounts to a _single_ extension function named "typeOf" ... that is testing whether a node is 'valid' with respect to a schema _and_ ascertaining the type of a node are the same thing (under the schema algebra formulation). The problem with using _only_ an XML representation of the PSVI is that it doesn't alone replace the "typeOf" function ... assume an XSLT processor that attaches an "xsi:type" attribute to each and every element in an XML document. For example <foo>123</foo> becomes ('psvi') <foo xsi:type="simonsVeryOwn:integer">123</foo> whipee!!! the reason that the "typeOf" function is more interesting is that it "understands" the type hierarchy so that the test: typeOf(node, "simonsVeryOwn:integer") and typeOf(node, "xsd:integer") both might be true, yet simply testing the value of a type adorning attribute doesn't tell us this. Note that "typeOf" is not unique to XPath, and a similar function would be introduced for DOM 8 or whatever the version is intended to support the 'PSVI' -Jonathan
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|