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

Re: We need an XPath API

  • From: "Thomas B. Passin" <tpassin@h...>
  • To: xml-dev@l...
  • Date: Sat, 03 Mar 2001 18:44:36 -0500

xpath in sax
Charles Reitzel proposed an API for XPATH -

> XPath isn't XML, so none of the XML tools work on it.  That said, it appears
> that parsing and interpreting XPath expressions is becoming more and more
> important in its own right.
>
> Proposal: let's give XPath the SAX treatment.
>
> What should such an API do?  How should it behave?
>
> 1) Small, lightweight
> 2) Should emit/accept XML representation
>    of XPath expression
> 3) Provide info about expression
> 4) Define an XML representation of XPath expressions
>
> Possibles (not so small):
> 1) Provide DOM traversal?
> 2) Provide SAX-based pattern matching?
>

Let's not stop here. Let's include XPointer.  I think that would be quite
important.  It may complicate things, I don't know, but there is going to be
the same need for XPointer.

I don't see 4) as being part of it at all.  There should be a mechanism for
handlers, as in SAX.  If you think about SAX, it basically says, "if you get
an element in the source,notify the application and included the element's
name and other info".  Ditto for other xml constructs. Then it says, "here's
what the java method should look like".  There's no XML representation in
there at all.  This is a Good Thing.

We need some requirements engineering here.  Especially, what would the API be
used for?  SAX lets us use a parser without having to know how to talk to each
different one.  What do we want to use our XPath/XPointer API for?

Here are some general kinds of things:

1) Parse and process the XPointer syntax. This would be useful for developers
to create XPointer  applications and toolkits.

2) Return node-sets.  This is more like a query capability, and would be more
useful for application writers.

3) Construct XPointer expressions based on some existing tree (fragment).

4) Construct XPointer expressions based on a schema (fragment?)

These are quite different, and it might not be feasible to accomplish all of
them.  We need to work out what would be valuable.  Let's remember the 80-20
proposition!

Cheers,

Tom P


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.