Von: Ben Orr Once a document has been validated via shematron, is there a way to get
Hi,
"lxml"
validation report for a specific element in the document? With store_report=True, I can find all the elements in the validation_report with a "location" attribute (which is an xpath) and see if any of them point to the element in question. If they do, the child "text" element in the validation_report contains the assertion/report message I'm looking for. If no locations point to the element, can I assume the element passed validation?
IIRC the "SVRL" only reports the fired rules and plus the rule violations,
unless
extra diagnostics output has been activated (sch:report elements).
So yes, if there's no
I plan to use this element-wise validation to present the user with a colour-coded tree (PySide treeview with delegate) of the document with valid elements in green and invalid elements in red. To make such a tree I would have to search the validation report "len(elements)" times and re-do the whole process after any change to the document.
Is there an easier/faster way to get element-wise validation?
Default to green/valid and set all location paths found
(