W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2005

Re: Chameleon includes and wildcard intersections

From: Kasimier Buchcik <K.Buchcik@4commerce.de>
Date: Thu, 06 Oct 2005 12:21:47 +0200
To: Kasimier Buchcik <kbuchcik@4commerce.de>
Cc: ML-xml-schema-dev <xmlschema-dev@w3.org>, "Henry S. Thompson" <ht@inf.ed.ac.uk>
Message-Id: <1128594107.1272.17.camel@librax>

Hi,

The following question is directed to the authors of XSV.

The intersection of the wildcards in this test is reported
by XSV to be:

wildcard(not [u'urn:test:foo', None, u'urn:test:bar'])

Can you expain this?
Although I learned that, in XML Schema 1.1, intersections
of multiple negated namespaces will probably be allowed,
what's the sense in moving to XML Schema 1.1 in XSV? How
can an author assure that a schema is processed in the 1.0
way? I see a source of confusion here if the people use
XSV, which seems to allow 1.1 thingies, and then wonder
why the schemata are not accepted by other processors.

Regards,

Kasimier


On Tue, 2005-09-06 at 18:31 +0200, Kasimier Buchcik wrote:
> Hi,
> 
> A chameleon-include test, checking wildcard intersections.
> This is a late, late follow-up of
> http://lists.w3.org/Archives/Public/xmlschema-dev/2004Nov/0037.html
> where I mentioned what the differences are if
> namespace conversion of chameleon includes takes place
> after or before wildcard intersection.
> 
> Results from Xerces and XSV differ here.
> 
> I used Xerces-J 2.7.1 and XSV 2.10 for the test.
> 
> cham-2.xsd
> ----------
> <xs:schema 
> 	xmlns:xs="http://www.w3.org/2001/XMLSchema"
> 	targetNamespace="urn:test:foo">
> 	<xs:include schemaLocation="cham-2.inc.xsd"/>
> </xs:schema>
> 
> cham-2.inc.xsd
> --------------
> <xs:schema
> 	xmlns:xs="http://www.w3.org/2001/XMLSchema"
> 	xmlns:b="urn:test:bar">
> 
> 	<xs:import namespace="urn:test:bar" schemaLocation="cham-2.imp.xsd"/>
> 
> 	<xs:attributeGroup name="thisAttrs">		
> 		<xs:attributeGroup ref="b:otherAttrs"/>
> 		<!-- Negation of 'absent'. -->		
> 		<xs:anyAttribute namespace="##other" processContents="lax"/>
> 	</xs:attributeGroup>
> 
> 	<xs:element name="foo">
> 		<xs:complexType>
> 			<xs:attributeGroup ref="thisAttrs"/>
> 		</xs:complexType>
> 	</xs:element>
> </xs:schema>
> 
> cham-2.imp.xsd
> --------------
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> 	targetNamespace="urn:test:bar">
> 	<xs:attributeGroup name="otherAttrs">
> 		<!-- Negation of "urn:test:bar". -->
> 		<xs:anyAttribute namespace="##other" processContents="lax"/> 
> 	</xs:attributeGroup>	
> </xs:schema>
> 
> cham-2.xml
> ----------
> <f:foo
> 	xmlns:f="urn:test:foo"
> 	xmlns:b="urn:test:boo"
> 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:schemaLocation="urn:test:foo cham-2.xsd"
> 	b:boo="lala"
> />
> 
> Validation of cham-2.xml against cham-2.xsd
> -------------------------------------------
> 
> XSV: no errors
> 
> Xerces:
> cham-2.inc.xsd:11,63: (Error) src-attribute_group.2: The intersection of
> wildcards is not expressible for attribute group 'thisAttrs'.
> 
> 
> The wildcards involved in the intersection are:
> <!-- "Not" and "urn:test:bar". -->
> <xs:anyAttribute namespace="##other"/> 
> <!-- "Not" and "absent". -->
> <xs:anyAttribute namespace="##other"/>
> 
> The result of Xerces is backed by cos-aw-intersect 5 [1]:
> "If the two are negations of different namespace names, then the
> intersection is not expressible."
> 
> This assumes that the namespace conversion specified in
> src-include 3.2.2 [2] was applied _prior_ to the intersection
> process. The other way round, the negated absent namespace
> would simply have disappeared due to cos-aw-intersect 6:
> 
> "If the one is a negation of a namespace name and the other is a
> negation of ·absent·, then the one which is the negation of a
> namespace name must be the value."
> 
> XSV reports the wildcard to be the following:
> 
> wildcard(not [u'urn:test:foo', None, u'urn:test:bar'])
> 
> For which I cannot find a rule; so it doesn't help
> clarify the issue.
> 
> But originally I tried to find out the intended timing for
> building "complete wildcards": before or after namespace-
> conversion. Does someone know?
> 
> This is an issue which gives me a headache for a long time;
> Libxml2 still behaves like Xerces, and I got the
> impression we don't work correct here, since the responses
> to questions about _when_ namespace-conversion should occur,
> seemed to condense to "build the schema first, then convert
> the namespaces".
> 
> [1] http://www.w3.org/TR/xmlschema-1/#cos-aw-intersect
> [2] http://www.w3.org/TR/xmlschema-1/#src-include
> 
> Regards,
> 
> Kasimier
> 
Received on Thursday, 6 October 2005 10:22:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:51 GMT