[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Types and Context
- From: Jonathan Borden <firstname.lastname@example.org>
- To: "Simon St.Laurent" <email@example.com>
- Date: Tue, 22 May 2001 19:11:39 -0400
Simon St.Laurent wrote:
> > sure. what we still need is a processable incarnation of the "PSVI". no
> > thing exists today. you are basically saying that "if we had an API
> > 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
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