[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: MicroXPath proposal

  • From: Uche Ogbuji <uche@ogbuji.net>
  • To: xml-dev@lists.xml.org
  • Date: Sun, 16 Jan 2011 11:17:51 -0700

Re:  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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.