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

RE: Question for the XPath and DOM folks

  • To: "Garland foster" <garland_foster@s...>
  • Subject: RE: Question for the XPath and DOM folks
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Sat, 20 Jul 2002 11:53:02 -0700
  • Cc: <xml-dev@l...>
  • Thread-index: AcIwHdMePa1SNPCvRWa88mlrVvPldQAAB6Bm
  • Thread-topic: Question for the XPath and DOM folks

dom nodeset node
If it returns a nodeset containing one text node should be returned then where does it come from and what is the node's parent? In the DOM the <foo> element has 3 children; 2 text nodes and 1 CDATA node. Your suggestion implies that the XPath query creates a new DOM node. 
 
Suppose we do create the new node. What happen when we query its parent? If the parent is <foo>, what happens when we ask it for its children do we get our original 3 or the newly created text node? 
 
I wonder what Jeni's right answer will be...
 
PS: I assume this was meant to be sent to the list so I CCed XML-DEV

	-----Original Message----- 
	From: Garland foster [mailto:garland_foster@s...] 
	Sent: Sat 7/20/2002 11:46 AM 
	To: Dare Obasanjo 
	Cc: 
	Subject: Re:  Question for the XPath and DOM folks
	
	

	Let's start with the wrong opinions before Jeni says the "right" thing :-)
	
	In my opnion it should return a nodeset containing one text node with "bar
	baz quux"
	The spec says that CDATA sections are treated as character data and that a
	text
	node cannot have a sibling which is also a text node.
	
	And I might be just finding another XML-SPY xpath bug :-) do you guys see it
	returning 3 text nodes ?
	
	Garland
	
	PS: You have the dreaded file:// preapended so following my Master-Jedi
	(Master-Jeni)
	advice I'd say that it returns "invalid xpath expression" :-)
	
	----- Original Message -----
	From: Dare Obasanjo <dareo@m...>
	To: <xml-dev@l...>
	Sent: Saturday, July 20, 2002 3:19 PM
	Subject:  Question for the XPath and DOM folks
	
	
	> Given the following XML in a DOM document
	>
	> <foo>
	> bar
	> <![CDATA[
	> baz
	> ]]>
	> quux
	> </foo>
	>
	> and the following XPath
	>
	> file://text()
	>
	> what should be the resulting DOM nodes and why? I can think of two answers
	but they both have problems.
	>
	>  PS: Why is http://www.w3.org/TR/2002/WD-DOM-Level-3-XPath-20020712/
	returning a 404 when it is linked from  http://www.w3.org/DOM/ ?
	>
	
	
	---
	Outgoing mail is certified Virus Free.
	Checked by AVG anti-virus system (http://www.grisoft.com).
	Version: 6.0.373 / Virus Database: 208 - Release Date: 7/4/02
	
	


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.