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
Michael

> -----Original Message-----
> From: www-ql-request@w3.org [mailto:www-ql-request@w3.org] On Behalf
Of
> 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
the
> 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
ancestor,
> preceding-sibling, and following-sibling axes have been dropped?
> 
> I found these axes useful in a couple of contexts.  My normal practice
(in
> XSLT) was to identify a unit of analysis and use for-each to iterate
at
> that
> level; I could then use ancestor to climb higher in the tree (or do I
mean
> lower?  closer to the root would be more accurate) and fetch data
which
> the
> current node had "inherited".  The sibling axes were handy for
proximity
> searches, so that I could study how objects were grouped together,
i.e.
> 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
myself
> (!):  "XPath 'axes' provide the tools to study structural
relationships,
> navigating the genealogy-like hierarchy of XML data.  In addition to
the
> commonly-used axes of direct descent - ancestors, parents, children
and
> descendants - there are also axes for siblings, preceding and
subsequent
> elements, which by extension enable one to relate elements to their
> 'cousins
> '.  These tools are of most use when looking at how objects are
grouped
> together, enabling co-occurrence and sequence to be considered."
> 
> Michael Kay is on record as having argued for the preservation of
these
> axes.  Since he lost the debate, the arguments against them must have
been
> pretty persuasive.  What were they?  I gather from Michael Brundage's
> XQuery
> book that some implementations are keeping these axes although they
are
> 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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:10:19 GMT