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

Re: XPATH question

Subject: Re: XPATH question
From: "Khalid Asad" <asad@xxxxxxxxxxxxx>
Date: Thu, 30 Mar 2000 16:45:38 -0800
xpath arbitrary element
Looking at these examples more closely, it seems that example 4.4.3 is the
closest to what I want, as long as I can use the output locations to refer
to specific nodes in the source XML document. The location values generated
all have position selectors, but only 'a' has more than one child node with
the same name. Does this cause a problem, or must the output be 'a/b[1]/c'
and 'a/b[2]/c' in order to select the appropriate source nodes?

Example 4.4.2 and 4.5.1 don't appear to be as general as 4.4.3, and none of
the three examples handle attributes. 4.4.2 does not handle multiple child
elements with the same name. 4.5.1 does consider siblings for each node in
the 'ancestor-or-self' axis, but it doesn't perform any sibling filtering.
So if 'A' had a first child element named 'Y', then wouldn't the output be
'A:1.B:3.C:2', which would try to select the third 'B' child of 'A'?

I think having an XPATH function in the XSL standard would be quite
valuable. Granted, the equivalent can be implemented, but for arbitrary
elements and attributes, implementing an XPATH function is not trivial.
Furthermore, it appears to be costly in terms of performance, especially if
I want to output the location for each element and attribute found in the
source document. If an XPATH function were to become part of the standard,
it's implementation would be reliable and parser developers would likely
include code optimizations so that the XPATH function would be much more
efficient than what appears to be achievable today.

Khalid


----- Original Message -----
From: "Steve Tinney" <stinney@xxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Monday, March 27, 2000 7:55 PM
Subject: Re: XPATH question


> > create in the output document the xpath location of the
> > matched node.
>
> See the examples in the faq under 4.4.2, 4.4.3, 4.5.1.
>
>  Steve
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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