- From: Eric van der Vlist <vdv@dyomedea.com>
- Date: Tue, 07 Nov 2000 20:10:52 +0100
- To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
I have some problems with "XSV 1.173.2.6/1.82 of 2000/10/31 16:30:47". I am validating a simple document [1] within the "http://example.org/ns/books/" namespace. The first test that works fine is using a schema [2] using qualified elements: <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" targetNamespace="http://example.org/ns/books/" elementFormDefault="qualified" > <xsd:element name="book"> .../... The second one is using a schema [3] using unqualified elements: <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:bk="http://example.org/ns/books/" targetNamespace="http://example.org/ns/books/" > <xsd:element name="bk:book"> ..../... XSV seems to fail matching the document element that is correctly identified: "docElt: {http://example.org/ns/books/}book " against the declaration of "bk:book" and switches to lax validation (which succeds but doesn't test anything else): "No declaration for document root found, validation was lax " To try to spot the problem, I have tried an intermediate schema [4] mixing qualified and unqualified elements: <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns="http://example.org/ns/books/" xmlns:bk="http://example.org/ns/books/" targetNamespace="http://example.org/ns/books/" elementFormDefault="qualified" > <xsd:element name="book"> <xsd:complexType> <xsd:sequence> <xsd:element name="bk:title" type="xsd:string"/> .../... Here again, the elements are not matched correctly: http://www.dyomedea.com/tests/xmlschema/ns/library-ns1.xml:4:2: Invalid per cvc-complex-type.1.2.4: element {http://example.org/ns/books/}:title not allowed here in element {http://example.org/ns/books/}:book: The full xml output gives more hints: <invalid char='2' code='cvc-complex-type.1.2.4' line='4' resource='http://www.dyomedea.com/tests/xmlschema/ns/library-ns1.xml'>element {http://example.org/ns/books/}:title not allowed here in element {http://example.org/ns/books/}:book: <fsm> <node id='1'> <edge dest='2' label='{http://example.org/ns/books/}:bk:title'/> </node> and lets me think that the prefix might have been ignored (bk:title). Or have I missed something more obvious ? Thanks Eric [1] http://www.dyomedea.com/tests/xmlschema/ns/library-ns1.xml [2] http://www.dyomedea.com/tests/xmlschema/ns/library-ns1.xsd [3] http://www.dyomedea.com/tests/xmlschema/ns/library-ns2.xsd [4] http://www.dyomedea.com/tests/xmlschema/ns/library-ns3.xsd -- ------------------------------------------------------------------------ Eric van der Vlist Dyomedea http://dyomedea.com http://xmlfr.org http://4xt.org http://ducotede.com ------------------------------------------------------------------------
Received on Tuesday, 7 November 2000 14:17:02 UTC