Re: XPath 1.0 change proposal

"C. M. Sperberg-McQueen" <[email protected]> Fri, 15 Mar 2013 09:26:46 -0600
Newsgroups gmane.text.xml.xpath.general
Message-ID <[email protected]>
On Mar 14, 2013, at 11:31 PM, James Clark wrote:

> On Fri, Mar 15, 2013 at 12:55 AM, C. M. Sperberg-McQueen =
<[email protected]> wrote:
>=20
> 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)).
> ...=20
>=20
> 1 "Some types of nodes also have an expanded-name." Follows from XML
> 1.0 + Namespaces 1.0.
>=20
> 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=20
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. =20

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=20=

far brought forward for the claim that the parent and sibling relations=20=

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.
>=20
> 7 "The namespace nodes are defined to occur before the attribute
> nodes."  Contradicts the normative statement of document order.
>=20
> 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).
>=20
> 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. =20

>=20
> =20
> 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).
>=20
>=20
> 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=20
XPath that the parent relation be acyclic.  Nothing here says so, =
implies
it, or even entails it.

>=20
> I hope I have convinced you that the data model section is intended to =
do nothing more than
>=20
> - 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=20
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=20
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. =20

It's passably clear that this discussion is not going to persuade either =
of us to=20
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=20
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=20=

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.

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