[lxml-dev] Validating against an external DTD

Hello, I just noticed that lxml has DTD-validation against external DTDs now in trunk YAAAAAAAAAAYYY. Thank you, thank you, thank you. I played around a little bit with it and noticed that assertValid is not working correctly. Is support for this planned as well or should I stick to using DTD.validate()? I would prefer an exception though. Kind regards, Michael PS: THANK you once again for adding this. If everything works out, I will remove pyxml completely from my application in the near future.

Hi, Michael Guntsche wrote:
I just noticed that lxml has DTD-validation against external DTDs now in trunk YAAAAAAAAAAYYY. Thank you, thank you, thank you.
:)
I played around a little bit with it and noticed that assertValid is not working correctly.
Ah, what?
The docstring of assertValid() says: "Raises DocumentInvalid if the document does not comply with the schema." So, how's that not working? Or were you expecting it to behave like "dtd.assert_()"? Stefan

Hi, Michael Guntsche wrote:
I just noticed that lxml has DTD-validation against external DTDs now in trunk YAAAAAAAAAAYYY. Thank you, thank you, thank you.
:)
I played around a little bit with it and noticed that assertValid is not working correctly.
Ah, what?
The docstring of assertValid() says: "Raises DocumentInvalid if the document does not comply with the schema." So, how's that not working? Or were you expecting it to behave like "dtd.assert_()"? Stefan
participants (2)
-
Michael Guntsche
-
Stefan Behnel