W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2012

RE: Access to Schema API information

From: <Jonathan.Robie@emc.com>
Date: Tue, 22 May 2012 09:18:30 -0400
Message-ID: <37B3729DD92A1747A1B51E3DAD1F91E160D5C0@CORPUSMX60A.corp.emc.com>
To: <mike@saxonica.com>, <ht@inf.ed.ac.uk>
Cc: <w3c-xsl-query@w3.org>, <xmlschema-dev@w3.org>
I would love to see both approaches worked out with a set of use cases
for a handful of schemas. I wonder if requiring all navigation to be
done using function calls limits the benefits of using a query language.

For node identity, maps are another possibility.


-----Original Message-----
From: Michael Kay [mailto:mike@saxonica.com] 
Sent: Tuesday, May 22, 2012 6:28 AM
To: Henry S. Thompson
Cc: w3c-xsl-query@w3.org; xmlschema-dev@w3.org
Subject: Re: Access to Schema API information

On 22/05/2012 11:06, Henry S. Thompson wrote:
> Michael Kay writes:
>> I have been implementing a Saxon extension that exposes the Schema 
>> Component Model to XSLT and XQuery applications
> Using functions is cool, but did you consider sticking with XPath?
It does stick with XPath, only it's XPath 3.0...

I think that attempts to model this information using elements and
attributes suffer two main problems:

(a) the node identity problem. It's hard to get away from the fact that
elements have identity, and if elements have identity and model schema
components then there is a strong expectation that node identity
reflects component identity, which (a) doesn't reflect the semantics of
the model (which explicitly leaves identity undefined), and (b) makes a
lazy implementation difficult.

(b) the network modelling problem: the schema component model is a
network, while XML is best at modelling trees. Any attempt to model a
graph in XML leads to (a) to arbitrary decisions about which
relationships to model as XML parent/child relationships, and (b) very
clumsy navigation when you have to follow the non-hierarchic links.

Using a functional model of the information neatly bypasses both these
issues. Functions in the XPath 3.0 model have no identity, so there is
no way of asking, for example whether two facets with the same
properties are "the same facet". All navigation is done using function
calls so there is no asymmetry between relationships "within the
hierarchy" and relationships "across the hierarchy".

Michael Kay
> See an old Extreme paper for some work we did in Edinburgh along those

> lines a long time back now:
>    Uniform access to infosets via reflection
>    Extreme Markup Languages 2003
>    http://www.ltg.ed.ac.uk/~ht/Extreme_2003.html
> ht
Received on Tuesday, 22 May 2012 14:06:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:16:01 UTC