OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xml-dev] Who can implement W3C XML Schema ?


I begin to be really worried about the "implementability" of W3C XML 
Schema and I'd like to give an example of what I have already 
experienced several times in the past months (I insist that this is an 
example and almost the general case, *not* an exception).

After two weeks spent trying to uncover the mechanism of whitespace 
processing and the help of Henry Thompson, I was confident I had come to 
  an accurate understanding of the issue:

[1] http://lists.w3.org/Archives/Public/xmlschema-dev/2001Oct/0212.html

I had then the funny idea to write the following very simple test.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="datatypes">
     <xs:element name="any"
         type="xs:string" minOccurs="0" maxOccurs="unbounded"/>

A schema can hardly be simpler. The document element is "datatypes" and 
it's expecting a sequence on 0 or more elements named "any" having a 
simple type "xs:string".

I thought that with this simple schema I would be able to create 
instance documents where I would overwrite the simple type to test other 
  W3C XML Schema predefined types and started with the following 
document which, according to [1] should be valid:

Instance document:
<?xml version="1.0" encoding="UTF-8"?>
<datatypes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	<any xsi:type="xs:string">
	<any xsi:type="xs:normalizedString">
	<any xsi:type="xs:token">
	<any xsi:type="xs:Name">

This isn't rocket science either :=) ...

The amazing (and worrying) thing is that I haven't found any schema 
processor able to validate this document (except xsv, but this isn't 
significant since xsv doesn't test the simple datatypes yet).

I have tried with MSXML 4.0B2, XML Spy 4.01, Xerces J 1.4.3 and Turbo 
XML 2.2.1 and each of them gives a different error and rejects the 
document for different reasons (MSXML says the last 3 elements are not 
conform to their declared types, XML Spy that you cannot redefine by 
xsi:type a simple type, Xerces says that the last element "only" isn't 
valid and Turbo XML that it doesn't know the xs:* predefined datatypes) 
but they all fail.

My purpose isn't to blame the vendors, all these products are solid and 
operational as far as W3C XML Schema isn't involved.

I may also still have missed something in the rec and my example may be 
invalid, but the point would remain that if you take 4 W3C XML Schema 
processors on a simple test case, you have very often 4 different answers.

I know that there is a huge effort to build test suites for W3C XML 
Schema and I would be happy to donate this simple sample ;=) but I 
wonder if it will be enough and if the difficulty to undertand the spec 
is not a serious threat to the interoperability of schema processors.

Rendez-vous  Paris pour le Forum XML.
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org