[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Who can implement W3C XML Schema ?

  • From: Eric van der Vlist <vdv@d...>
  • To: xml-dev@l...
  • Date: Tue, 23 Oct 2001 22:53:37 +0200

kjlkj
Hi,

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.

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

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" 
xsi:noNamespaceSchemaLocation="anytype.xsd" 
xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<any xsi:type="xs:string">
	kjlkj
	lkhjlkjhkl
	jnbjhjk
	</any>
	<any xsi:type="xs:normalizedString">
	kjlkj
	lkhjlkjhkl
	jnbjhjk
	</any>
	<any xsi:type="xs:token">
	kjlkj
	lkhjlkjhkl
	jnbjhjk
	</any>
	<any xsi:type="xs:Name">
		hjkhjk
	</any>
</datatypes>

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.

Eric
-- 
Rendez-vous à Paris pour le Forum XML.
                    http://www.technoforum.fr/Pages/forumXML01/index.html
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.