Re: XSV accepting any document element?

Eric van der Vlist <vdv@dyomedea.com> writes:

> 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?

The REC explicitly says that lax processing is an allowed processor
strategy in the absence of a declaration for the root.

> 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'>

<snip/>

Sorry not to have announced this louder -- from 1.203.2.34, people
working with the CVS tree need a new LTXML & PyLTXML release.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Tuesday, 27 November 2001 14:04:39 UTC