W3C home > Mailing lists > Public > www-ql@w3.org > April to June 2004

RE: Ancestors and siblings

From: Michael Rys <mrys@microsoft.com>
Date: Mon, 24 May 2004 07:19:13 -0700
Message-ID: <EB0A327048144442AFB15FCE18DC96C702F8CB8F@RED-MSG-31.redmond.corp.microsoft.com>
To: "Donald Spaeth" <donald@spaeth.freeserve.co.uk>, <www-ql@w3.org>

XPath 2.0 still has them and for XQuery they have been added as optional
in the last call draft. Why do you think they are gone?

Best regards

> -----Original Message-----
> From: www-ql-request@w3.org [mailto:www-ql-request@w3.org] On Behalf
> Donald Spaeth
> Sent: Monday, May 24, 2004 6:42 AM
> To: www-ql@w3.org
> Subject: Ancestors and siblings
> I've just been reviewing the proofs of an article I wrote last year on
> use of XML to represent data derived from historical sources, and I
> realize
> that a passage on the many and wondrous uses of axes has been rendered
> obsolete by XPath 2.0 and XQuery.  Can someone explain why the
> preceding-sibling, and following-sibling axes have been dropped?
> I found these axes useful in a couple of contexts.  My normal practice
> XSLT) was to identify a unit of analysis and use for-each to iterate
> that
> level; I could then use ancestor to climb higher in the tree (or do I
> lower?  closer to the root would be more accurate) and fetch data
> the
> current node had "inherited".  The sibling axes were handy for
> searches, so that I could study how objects were grouped together,
> look
> at other leaves sharing the same stem.
> I can see ways to achieve the same effect in XQuery, using let and
> position,
> but these seem rather roundabout.  If I can be permitted to quote
> (!):  "XPath 'axes' provide the tools to study structural
> navigating the genealogy-like hierarchy of XML data.  In addition to
> commonly-used axes of direct descent - ancestors, parents, children
> descendants - there are also axes for siblings, preceding and
> elements, which by extension enable one to relate elements to their
> 'cousins
> '.  These tools are of most use when looking at how objects are
> together, enabling co-occurrence and sequence to be considered."
> Michael Kay is on record as having argued for the preservation of
> axes.  Since he lost the debate, the arguments against them must have
> pretty persuasive.  What were they?  I gather from Michael Brundage's
> XQuery
> book that some implementations are keeping these axes although they
> not
> required to do so.  Why not just keep them within the specification?
> Thanks,
> Donald Spaeth
> Dr Donald Spaeth
> Senior Lecturer in Historical Computing
> Department of History
> 2 University Gardens
> University of Glasgow
> Glasgow  G12 8QQ
> tel. 0141 330 3580
> reply to:  d.spaeth@history.arts.gla.ac.uk
Received on Monday, 24 May 2004 10:19:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:43 UTC