XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] MicroXPath proposal

On Fri, Jan 14, 2011 at 7:58 PM, James Clark <jjc@jclark.com> wrote:
My two satang's worth on this is that XPath 1.0 is already fairly micro.  For me (and I am admittedly biased) the natural MicroXPath is XPath 1.0, with its namespace treatment adjusted to be consistent with whatever MicroXML does.  For example, if MicroXML takes the approach of allowing prefixes but not giving any special meaning to namespace declarations, then MicroXPath would just match prefixes and treat namespace declarations as attributes.  In fact, since XPath 1.0 is defined in terms of its data model, this adjustment can (all/mostly?) be handled by specifying an appropriate mapping from the MicroXML data model to the XPath 1.0 data model, without changing the semantics of XPath 1.0 itself.

XPath 1.0 isn't hard to implement; the challenge is more in making it efficient.  I would guess the most inconvenient part is the namespace axis, and adjusting MicroXPath to match the MicroXML treatment of namespaces would hopefully get rid of that.

XPath 1.0 can already express inherited attributes; it would be nice to have a simpler way of doing this, but once you open the door to extensions, it's hard to know where to draw the line.

The only subset of XPath 1.0 that makes sense to me is one that has the goal of being able to create one path that uniquely identifies any element (and perhaps attribute) in a document. Something like

  /foo[2]/bar[1]/baz[3]

But this subset would useful in only a small subset of the cases in which XPath 1.0 is useful.

I agree with the above until the last point.  I also believe that the "streamable" subset of XPath 1.0 is useful, though of course people establish such a subset in several ways.  I'd say XSLT 1.0's pattern language comes close enough for most uses.


--
Uche Ogbuji                       http://uche.ogbuji.net
Weblog: http://copia.ogbuji.net
Poetry ed @TNB: http://www.thenervousbreakdown.com/author/uogbuji/
Founding Partner, Zepheira        http://zepheira.com
Linked-in: http://www.linkedin.com/in/ucheogbuji
Articles: http://uche.ogbuji.net/tech/publications/
Friendfeed: http://friendfeed.com/uche
Twitter: http://twitter.com/uogbuji
http://www.google.com/profiles/uche.ogbuji


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS