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

Had meant this to go to the list.
> On Sat, Jan 15, 2011 at 10:04 PM, Uche Ogbuji <uche@ogbuji.net> wrote:
>
> > 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.
>
>
On Sat, Jan 15, 2011 at 11:52 PM, John Cowan <johnwcowan@gmail.com> wrote:

>

> Now that's a *very* interesting idea: the path would allow / and //,
> and the legal path steps are: name, *, @name, @*, text(), and
> id(name).   That's very close to my original proposal.  But patterns
> are no simpler than XPath 1.0 for the implementor, because *any*
> expression can be a predicate in a pattern, so you end up having to
> implement the whole of 1.0 anyway.  What is the simplest set of
> predicates that could possibly work?
>

Well I might as well offer my own take on that matter.

The predicates bit from
http://www.xml3k.org/Amara/Architecture/Streaming_XPath

>
Is:


   - numerical predicates
      -

      e.g. a[1]
      - a numerical or positional predicate is only allowed in a step using
      the child axis
         -

         e.g. these are *forbidden*: a/descendant::b[2] and
         a/descendant-or-self::b[2]
         -

         but this is OK: a//b[2] since it expands to
         a/descendant-or-self::node()/child::b[2] and hence the predicate is
         on a step using the child axis
         - predicates that only use the attribute or self axis for value
   comparison
      -

      e.g. a[@attr = 'value']
      - Boolean expressions in predicates
      -

      e.g. a[@id='1' or @id='2'], a[@id='1' and @spam='eggs'],
      a[@id='1' and not(@spam='eggs')]


There might be some quirks/holes in the above, and I might as well have
those pointed out here as anywhere else.

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