Schema fails to validate: '' is not a valid value of the atomic type 'xs:int'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Recently started failing with the following code:
---
from lxml import etree
SCHEMA = """<?xml version="1.0"?>
<xs:schema xmlns:xs="http://
attributeFor
<xs:element name="testsuite" type="testsuite"/>
<xs:complexType name="testsuite">
<xs:attribute name="errors" type="xs:int">
</xs:attribute>
</xs:complexType>
</xs:schema>"""
schema_root = etree.XML(SCHEMA)
schema = etree.XMLSchema
XML = """
<testsuite errors=
"""
xml = etree.fromstrin
---
I get:
XMLSyntaxError: Element 'testsuite', attribute 'errors': '' is not a valid value of the atomic type 'xs:int'
Python : sys.version_
lxml.etree : (3, 6, 1, 0)
libxml used : (2, 9, 4)
libxml compiled : (2, 9, 4)
libxslt used : (1, 1, 29)
libxslt compiled : (1, 1, 29)
I'm getting a nearly identical issue to this bug, except with xs:float values versus xs:int.
Does not seem to be present in 3.6.0 or 3.6.1.
Definitely in version 3.6.4.
Have not tried 3.6.2 or 3.6.3.