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

Re: Access to Schema API information

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Tue, 18 Sep 2012 10:30:48 +0100
To: Michael Kay <mike@saxonica.com>
Cc: "w3c-xsl-query\@w3.org" <w3c-xsl-query@w3.org>, "xmlschema-dev\@w3.org" <xmlschema-dev@w3.org>
Message-ID: <f5b8vc7znhz.fsf@calexico.inf.ed.ac.uk>
[Sorry for earlier no-comment reply!]

Michael Kay writes:

> 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.

Good point.

> (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.

Not necessarily -- you can use XPath over an arbitrary directed graph
just fine (modulo some issues wrt cycles and //, but those are
reasonably straightforward to resolve).  You can't _serialise_
re-entrant or cyclic graphs as vanilla XML, but that's not relevant to
the task at hand.

       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]
Received on Tuesday, 18 September 2012 09:31:15 UTC

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