Hello,
I'm not quite sure if I'm asking a question, or sharing an observation.
Is it possible that an lxml.etree instance validates before a replace()
call, but not after? The error messages I get from the lxml validation
are almost 200 of the same:
<string>:440:0:ERROR:SCHEMASV:SCHEMAV_CVC_IDC: Element 'deviation': No match found for key-sequence ['WtC2eoepX'] of keyref 'deviationstyle-refer'.
Looking at the actual XML I can positively confirm that the IDs and
IDREFs exist and are valid, before and after the replace() call.
The new subtree is equivalent to the old one, but there are elements in
the whole tree that refer to elements in the replaced subtree. I
suspect that this causes the problem.
Interestingly:
- xmllint validates the new tree when written to a file, and
- if I serialize the entire tree (including the new replaced subtree)
and parse it back, it validates.
This is intended behavior, an odd side effect, or a bug?
Thanks!
Jens
--
Jens Tröger
http://savage.light-speed.de/
Hi folks, I have yet another stupid question😂. I'm getting the carriage
return as an entity ( ) in HTMLs I generate. Is there a way to get rid
of them?
I haven't found anything after a lot of duckduckgo'ing
Thanks a lot
/PA