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

XPointer question

  • From: Stefan Kreutter <stefan@o...>
  • To: xml-dev@i...
  • Date: Tue, 2 Mar 1999 12:41:59 +0100

xml questions xpointer
Hello there!

given the following XML-snippet:

<customers>
<customer id="foo">
<name>Bart Simpson</name>
</customer>
<customer id="bar">
<name>Homer Simpson</name>
</customer>
</customers>

can I use th following XPointer to get the customer ID of Bart Simpson:

root().child(all, customer).child(1,name).string(1, "Bart Simpson").ancestor(1, customer).attr(id)

I guess this sould work since the XPointer grammar allows to place OtherTerm after a StringTerm, but I'm not sure if I understood the spec completely.

Since string() might return portions of multiple nodes (see 3.7 of WD-xptr-19980202) applying ancestor() seems a little problematic.

BTW is there a typo in the XPtr-spec? In grammar rule [2] it says:

[2] OtherTerms ::= OhterTerm | OtherTerm . OtherTerm


shouldn't that be:

[2] OtherTerms ::= OhterTerm | OtherTerm . OtherTerms

this would allow XPointers of any length not just one or two OtherTerms.

-Stefan

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.