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

XSV accepting any document element?

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Tue, 27 Nov 2001 19:45:09 +0100
Message-ID: <3C03DF35.5040208@dyomedea.com>
To: xmlschema-dev <xmlschema-dev@w3.org>
XSV accepting any document element?
I find the behavior of XSV when the document element is not defined weird:

XML:
<?xml version="1.0" encoding="UTF-8"?>
<fake>
<root>azertyuiop</root>
</fake>

XSD:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="root" type="xs:string"/>
</xs:schema>

Result with XSV 1.2:
<?xml version='1.0'?>
<xsv docElt='{None}fake' instanceAssessed='true' instanceErrors='0' 
schemaDocs='element-document.xsd' schemaErrors='0' 
target='/home/vdv/repros/xsv/element-document.xml' validation='lax' 
version='XSV 1.205/1.109 of 2001/10/03 21:06:42' 
xmlns='http://www.w3.org/2000/05/xsv'>
<schemaDocAttempt URI='/home/vdv/repros/xsv/element-document.xsd' 
outcome='success' source='command line'/>
</xsv>

I would expect an error (the "fake" element hasn't been defined) rather 
than a success with a lax validation. Do I miss something?

I had the same result 15 minutes ago with a 2 weeks old version of XSV, 
however, I have just updated it from CVS to test it on the latest XSV 
and I have now the following crash:

<?xml version='1.0'?>
<xsv crash='true' instanceAssessed='false' 
schemaDocs='element-document.xsd' 
target='/home/vdv/repros/xsv/element-document.xml' version='XSV 
1.203.2.36/1.106.2.18 of 2001/11/27 15:33:12' 
xmlns='http://www.w3.org/2000/05/xsv'>
<bug>validator crash during target reading</bug>
</xsv>
Traceback (most recent call last):
   File "/home/vdv/scripts/xmlschema/applyschema.py", line 1338, in ?
     raise SchemaValidationError,res
__main__.SchemaValidationError: Traceback (most recent call last):
   File "/home/vdv/scripts/xmlschema/applyschema.py", line 856, in 
safeReadXML
     doc=readXML(ren)
   File "/home/vdv/scripts/xmlschema/applyschema.py", line 33, in readXML
     doc = LTXMLInfoset.documentFromURI(url)
   File "/home/vdv/scripts/xmlschema/LTXMLInfoset.py", line 7, in 
documentFromURI    doc = documentFromFile(file)
   File "/home/vdv/scripts/xmlschema/LTXMLInfoset.py", line 29, in 
documentFromFile
     d.addChild(elementFromBit(d, b, file, w))
   File "/home/vdv/scripts/xmlschema/LTXMLInfoset.py", line 39, in 
elementFromBit    prefix = bit.prefix
LTXMLinter.error: Unknown Bit attribute prefix

Error found by xsv

Hope this helps.

Eric
-- 
See you in Orlando for XML 2001.
                                     http://www.xmlconference.net/xmlusa/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------
Received on Tuesday, 27 November 2001 13:45:14 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.