- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Mon, 14 Mar 2011 20:09:46 +0000
- To: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
- Cc: www-xml-schema-comments@w3.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
C. M. Sperberg-McQueen writes:
>> least allow 1.0 processors to do in the perfectly ordinary case of
>>
>> <element name="foo"/>
>> <element name="foo"/>
>>
>> which 1.0 processors may (must?) treat as an error.
>
> I don't see anything in 1.0 that allows this to be treated as
> an error, let alone requires it.
we should add a test to the test suite.
>. . .
>
> Your suggestion that source identity be taken as a basis
> for deciding the issue may run into a similar problem: is
> it possible to prove from the infoset spec that there are
> two distinct elements in the fragment you've given above?
> I don't think so; I think claiming that there are two elements
> and claiming that there is one element are both compatible
> with the infoset spec.
>
> Am I missing something?
We've been reminded recently that treating the infoset as a
specification of a data model is both going beyond its intent, and
liable to get one into trouble. . .
But I think it does:
[children] An ordered list of child information items, in document
order. This list contains element, processing instruction, unexpanded
entity reference, character, and comment information items, _one for
each element_, processing instruction, reference to an unprocessed
external entity, data character, and comment appearing immediately
within the current element. If the element is empty, this list has no
members. [emphasis added]
I presume we have to discharge words such as 'element' in the above by
reference to the XML spec., where I think there is no doubt that there
are indeed three elements in this document:
<d>
<element name="foo"/>
<element name="foo"/>
</d>
In any case, if we look at either the DOM (at least level 3, not sure
about earlier versions) (which is admittedly an API, not a data model)
or the XDM (not sure about XPath 1), I think we do get a definite
'yes' answer.
But I do agree the spec. refers to the Infoset and not one of
those. . .
Do you at least agree that count(d/*) = 2 and d/*[1] and d/*[2] are
distinct nodes (have different node identities, in the XDM's
terminology)?
That's all I need, I think.
ht
- --
Henry S. Thompson, School of Informatics, University of Edinburgh
10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail from me _always_ has a .sig like this -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFNfnYKkjnJixAXWBoRAouDAJ4i+53F4eNjPO1jTic6hbMG5k6pwQCfQN/a
lLaC/FMTXJ6o3eurCPqPSHo=
=ALMO
-----END PGP SIGNATURE-----
Received on Monday, 14 March 2011 20:10:17 UTC