Bug report

Hi,

The XML Schema Validator
(http://www.w3.org/2001/03/webdata/xsv)
consistently crashes (see bug report copy/pasted below) when
submitting a local (i.e. non-web-based) schema with all 3 options (show
warnings, keep going, complete schema) selected.

Basically, I updated this part of a 400-lines schema that validates correctly:

<xs:simpleType name="lb" />

<xs:complexType name="pb">
<xs:attribute name="n" type="xs:positiveInteger" use="required "/>
<xs:attribute name="column" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"/>
<xs:enumeration value="b"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>

to this version that leads to the crash:

<xs:simpleType name="merge-split-word">
<xs:restriction base="xs:string">
<xs:enumeration value="keep-dash" />
<xs:enumeration value="discard-dash" />
<xs:enumeration value="no" />
</xs:restriction>
</xs:simpleType>

<xs:complexType name="lb">
<xs:attribute name="merge-split-word" type="merge-split-word" />
</xs:complexType>

<xs:complexType name="pb">
<xs:attribute name="n" type="xs:positiveInteger" use="required "/>
<xs:attribute name="column" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"/>
<xs:enumeration value="b"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="merge-split-word" type="merge-split-word" />
</xs:complexType>


Moreover, to obtain the bug report below, I had to select the "xml,
but labelled text/plain" option, as none of the 3 others would display
correctly the bug report (there was a short error message, but no
explanation or bug report).

Best regards,

C B




Bug report:

<?xml version='1.0'?>
<xsv xmlns="http://www.w3.org/2000/05/xsv" instanceAssessed="false"
realName="fsml.xsd"
schemaDocs="file:/usr/local/XSV/xsvlog/tmpo--ff7uploaded" schemaErrors="0"
target="[standalone schema assessment]"
version="XSV 3.1-1 of 2007/12/11 16:20:05">
<schemaDocAttempt URI="file:///usr/local/XSV/xsvlog/tmpo--ff7uploaded"
outcome="failure" source="command line"/>
<bug>validator crash during command line:
Traceback (most recent call last):
File "/usr/local/XSV/src/XSV/compile/SSchema.py", line 672, in checkinSchema
res=self.fromFile(loc,frag,namespace,why,btlist,ne,useDTD,keepGoing)
File "/usr/local/XSV/src/XSV/compile/SSchema.py", line 400, in fromFile
sdoc.documentElement)
File "/usr/local/XSV/src/XSV/infoset/relNorm/rebuild.py", line 290,
in fromFile
res=self.processElement(root)
File "/usr/local/XSV/src/XSV/infoset/relNorm/rebuild.py", line 374,
in processElement
eres.append(self.processElement(d))
File "/usr/local/XSV/src/XSV/infoset/relNorm/rebuild.py", line 374,
in processElement
eres.append(self.processElement(d))
File "/usr/local/XSV/src/XSV/infoset/relNorm/rebuild.py", line 412,
in processElement
res.init(elt)
File "/usr/local/XSV/src/XSV/compile/elts/attributeElt.py", line 23, in init
defRefElt.init(self,'attribute',attributeGroupElt,('ref',))
File "/usr/local/XSV/src/XSV/compile/elts/defRefElt.py", line 25, in init
self.checkInternal()
File "/usr/local/XSV/src/XSV/compile/elts/attributeElt.py", line 60,
in checkInternal
self.use or 'optional',vct,value)
File "/usr/local/XSV/src/XSV/compile/AttributeUse.py", line 28, in __init__
(self.minOccurs,self.maxOccurs)=_attrOccurs[use]
KeyError: u'required '
</bug>
</xsv>


_________________________________________
Tired of download limits?
Scarlet NO LIMIT, now only 19,95 EUR
Go to www.scarlet.be for more info!

Received on Monday, 1 June 2009 19:21:30 UTC