[
Lists Home |
Date Index |
Thread Index
]
- To: "Garland foster" <garland_foster@salutia.com>
- Subject: RE: [xml-dev] Question for the XPath and DOM folks
- From: "Dare Obasanjo" <dareo@microsoft.com>
- Date: Sat, 20 Jul 2002 11:53:02 -0700
- Cc: <xml-dev@lists.xml.org>
- Thread-index: AcIwHdMePa1SNPCvRWa88mlrVvPldQAAB6Bm
- Thread-topic: [xml-dev] Question for the XPath and DOM folks
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@salutia.com]
Sent: Sat 7/20/2002 11:46 AM
To: Dare Obasanjo
Cc:
Subject: Re: [xml-dev] 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@microsoft.com>
To: <xml-dev@lists.xml.org>
Sent: Saturday, July 20, 2002 3:19 PM
Subject: [xml-dev] 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
|