Before I file a ticket, I wanted to check here to find out if this is
a known problem (I searched the bug tracker, but didn't see any
matches).

Our customer is using a commercial XML editor and the editor's
implementation of the DOM API sometimes garbles whitespace inside text
nodes when serializing XML documents for the document's xml property.
This causes schema validation errors when we send that serialization
off to be validated against the document type's schema using lxml. The
problem we have run into with lxml is that the message property of the
error object which comes back in the schema object's error_log has
altered the value being validated. So, for example, if the text
content of an element in the serialized DOM is "Processing\ncomplete"
and the value it was supposed to match in the enumerated valid values
is "Processing complete" then the message attribute for the
corresponding object in the error_log has

Element 'ProcessingStatusValue': [facet 'enumeration'] The value
'Processing complete' is not an element of the set {'Ready for English
peer review', 'Ready for English scientific review', 'Ready for
English OCCM review', 'Ready for Spanish peer review', 'Ready for
Spanish OCCM review', 'Ready for publishing', 'Ready for translation',
'Processing complete'}.

In effect saying "the value 'Processing complete' does not match the
value 'Processing complete'."

Took a very long time for us to figure out that the error message was
wrong, and that it should have said

... The value 'Processing\ncomplete' is not an element of the set ....

-- 
Bob Kline
https://www.rksystems.com
mailto:bkl...@rksystems.com
_______________________________________________
lxml - The Python XML Toolkit mailing list -- lxml@python.org
To unsubscribe send an email to lxml-le...@python.org
https://mail.python.org/mailman3/lists/lxml.python.org/
Member address: arch...@mail-archive.com

Reply via email to