W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

Re: Selector Clarification

From: Daniel Veillard <daniel@veillard.com>
Date: Wed, 10 Apr 2002 10:40:09 +0200
To: Jeni Tennison <jeni@jenitennison.com>
Cc: Rahul Srivastava <Rahul.Srivastava@Sun.COM>, xmlschema-dev@w3.org
Message-ID: <20020410104009.F31502@daniel.veillard.com>
On Wed, Apr 10, 2002 at 07:42:08AM +0100, Jeni Tennison wrote:
> > 2 Each node in the Ětarget node setĚ is an element node among the descendants of the 
> > context node. 
> >
> > ....
> > ]]
> >
> > Looking at point 2 above, it reflects that, we cannot use '.' as the
> > XPath expr. for a selector. Does *descendants of the context node*
> > includes the context node?
> Good point. I'd missed that. Usually, "descendants of the context
> node" doesn't include the context node, so I guess that would be the
> intention here.

  Right, otherwise I would have expected them to use the XPath name
"descendant-or-self" in some way.

> > On the other hand the production rule for the XPath expr. for the
> > selector allows '.' as a valid XPath expr.
> > http://www.w3.org/TR/xmlschema-1/#coss-identity-constraint
> Yes. This leaves us in a position where it's valid for a schema to
> contain a selector that has the xpath ., but it's not valid for an
> instance to contain an element that uses that identity constraint.

  The XPath expresssion in the SchForSch is actually very broken,
like in accepting "a:1", it seems it wasn't defined and tested 
with the idea that the expression would really be the normative definition.
I would give more trust to the written section over the expression itself.

> I'm not sure whether the intention of the WG was to allow identity
> constraints to select the context node or to disallow it. None of the
> implementations that I tested (XSV, MSXML, Xerces-C++, Xerces-J)
> complained about using <xs:selector xpath="." />, either within the
> schema or when there was an element in the instance document using the
> identity constraint.
> You really need confirmation from W3C. Messages to
> www-xml-schema-comments@w3.org might elicit an official response.

  Right, maybe Henry Thomson could hint here on the expected behaviour,
but 2/ seems to very clearly disallow '.' 


Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
Received on Wednesday, 10 April 2002 04:40:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:56 UTC