Re: XPath 1.0 change proposal

On Mar 14, 2013, at 11:31 PM, James Clark wrote:

> On Fri, Mar 15, 2013 at 12:55 AM, C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com> wrote:
> 
> the following sentences seem to be either unnecessary repetitions
> of simple facts that follow from the 1:1 relation between nodes in the
> data model instance and constructs in the XML spec, or contradictions
> of things normatively stated either in the XML spec, the namespaces
> spec, or elsewhere in XPath 1.0 (especially assumption (c)).
> ... 
> 
> 1 "Some types of nodes also have an expanded-name." Follows from XML
> 1.0 + Namespaces 1.0.
> 
> XML Namespaces says nothing about the concept of "node".  The fact that XML Namespaces says that elements have expanded-names doesn't necessarily imply that XPath 1.0 element nodes have expanded-names.  A key aspect of the data model is the selection of available information that it chooses to expose.

You seem to be establishing the principle that nodes share properties with 
the corresponding constructs in the XML document (however one might
choose to define them) if and only if the definition of the data model
explicitly mentions those properties.  

On this reading, the normative reference to the XML spec seems to have
no function.

And this principle cuts away the ground underneath every argument thus 
far brought forward for the claim that the parent and sibling relations 
should be thought of as acyclic, even though the text does not say so.

On this reading, the current text is not a good effort with a few slips,
but fundamentally broken.
> 
> 7 "The namespace nodes are defined to occur before the attribute
> nodes."  Contradicts the normative statement of document order.
> 
> This is giving you the definition of document order for attribute nodes.

So - no textual demarcation between the sentences that are (on your
reading) merely fleshing out / repeating the normative statement of
document order, and this one, which modifies it by contradicting it?

Well, bad drafting is not a criminal offense.  It can happen to the best.

If you don't see the contradiction, then I do not see how to help you.


> 10 "Nodes never share children: if one node is not the same node as
> another node, then none of the children of the one node will be the
> same node as any of the children of another node."  Follows from
> assumption (a).
> 
> That is addressing a misinterpretation that could arise because of general entity expansions.

But it fails to address the problem of distinctiveness adequately -- it
only addresses the case where the entity references occur directly
within different parents.  

> 
>  
> 11 "Every node other than the root node has exactly one parent, which
> is either an element node or the root node."  Follows from XML 1.0
> (assuming the usual usage of the word "parent" in XML contexts).
> 
> 
> This is giving a precise definition of the term parent, which is a crucial for XPath.

No, not precise at all.  It is (on the usual reading of the spec) crucial for 
XPath that the parent relation be acyclic.  Nothing here says so, implies
it, or even entails it.

> 
> I hope I have convinced you that the data model section is intended to do nothing more than
> 
> - explain how to construct the instance of the data model from an XML document
> - define for such instances various key terms (parent, child, document order, expanded-name, string-value etc) which are used in the rest of the spec

There are several problems here.

First, the intent of the WG or the original editors can be reconstructed (when and
to the extent that it can be reconstructed) by appeal to contemporary documents
or other historical evidence.  Nothing in your mail speaks directly to the question of 
intent, and any statement about the intent of the text is a non sequitur.

Second, you seem to be falling victim to the intentional fallacy, an elementary
error on textual interpretation which is common enough.  The conscious or 
unconscious intent of the authors of a text can be of historical interest, but it
does not determine what the text means, if for no other reason than that humans
do not always succeed in doing what they intend to do.  

It's passably clear that this discussion is not going to persuade either of us to 
change our minds and that it's unlikely to provide any illumination to any third
parties.   I believe that the XPath 1.0 spec has a number of simple errors, which are
easily fixed; you deny that there are errors and assert at the same time that
fixing them would involve a much more extensive revision.

Perhaps I am wrong to say neither of us will change the other's mind; you have 
made me consider seriously for the first time that if it's impossible to persuade the
responsible WGs to fix the problems, then it may be better to ask W3C to 
withdraw the XPath 1.0 spec and deprecate its use in favor of the XDM 2.0 and
3.0 specs, which do a better job and which the responsible WGs are more
willing to maintain.

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com 
* http://cmsmcq.com/mib                 
* http://balisage.net
****************************************************************

Received on Friday, 15 March 2013 15:27:18 UTC