[lxml-dev] Fun With Sequencing
Stefan Behnel
stefan_ml at behnel.de
Sat Mar 14 15:45:31 CET 2009
[and to the list]
Hi,
Tennis Smith wrote:
> I am generating xml files (for test purposes) that will be validated
> with a schema which uses "xs:sequence". The result is that my docs have
> to have exactly the right sequence of elements or it will not validate.
Could you say a bit more about your constraints? Why can't you just change
the schema, if it's purely for test purposes? And why can't you just look
at the schema once and generate the XML documents accordingly?
> Its going to be a pain to re-parse the schema file and then use the
> munged data to sort my xml docs. So, is there some way in lxml I can
> dump the schema's contents and use that to make sure I have everything
> in order *before* I try to validate?
No, and I doubt that there's a major use case for that. Validation is about
figuring out that something is wrong (any usually also what is wrong), not
about getting stuff fixed automatically.
Stefan
More information about the lxml-dev
mailing list