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

Re: The limitations of XPath and navigation for XML da

  • From: mike@a...
  • To: noah_mendelsohn@u..., mike@a...
  • Date: Thu, 07 Feb 2008 23:39:30 +0000

Re:   The limitations of XPath and navigation for XML        da

Hi  Noah, you wrote me-

>
>Yes, but I think you're misreading XPath. By that definition, it's
>declarative, though that may not be obvious. Let's look at a simple
>XPath:
>
>/A/B/C
>
>Someone could have specified the languages as: "First you go to the root,
>then you find an A, then within that you find a B". That's a procedural
>language, and it's probably how you're thinking about it. That's not the
>way I look at XPath and I think not the way it's intended to be looked at.
> I believe that the intended way to think about the same expression is:
>"This expression matches any one or more C's that are within B's that are
>within an A that's an immediate child of the root.
>
>Note that this latter interpretation does >not< tell you how to find them.
> One obvious way, is to find all the A's, then within that find all the
>Bs, and so on, but there are other implementation strategies. You might
>read in a whole document, make a hash to find out where all the elements
>are by name, and by the way count the number of occurrences and set up
>parent pointers. You might notice that while there are 100,000 As, there
>are only 2 Cs. Using this information, an XPath optimizer might decide to
>go directly to each of the Cs and follow its parent chain to discover
>whether it in fact satisfies the XPath.
>
>

Your example of XPath /A/B/C being able to be processed internally in any way that is still semantically correct to optimize it could be applied to COBOL and I would not consider COBOL  nonprocedural. What it boils down to with me is that XPath is logically specifying the logic (externally) that is needed to be performed (internally). The external navigation instructions must be specified procedurally to correctly define any of the possible choices for internal operations. I think there is both a user and developer perspective for what is nonprocedural or procedural. My article was writing to the user audience.

 

    /Mike



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