[lxml-dev] schema validation support
Stefan Behnel
stefan_ml at behnel.de
Sun Aug 10 08:14:13 CEST 2008
Hi,
Santoro, Peter wrote:
> I have used xerces/java, in the past, to do xml work without schema
> validation. As I now prefer to use python, I'm considering using lxml
> to validate xml instance documents against associated schemas. So far,
> I'm impressed with my initial testing. Thank you for making this
> software available!
:)
> I'm curious if anyone has compared/benchmarked lxml/libxml2 schema
> validation support with what's available in Apache's xerces project?
Here's a very old benchmark, no idea how they compare today.
http://xmlbench.sourceforge.net/results/benchmark200402/index.html
If you can come up with some meaningful numbers yourself, please post them
either here or on the libxml2 list. I would expect others to be interested, too.
> What, if any, limitations to the xlml/libxml2 schema validation support
> have others hit that I should be aware of?
While, theoretically, I know that there are still some incompletely supported
schema constructions, I know of none that you should be particularly aware of.
Maybe others can comment here who actually /did/ encounter anything in
practice, but a better place to ask (and search) is the libxml2 list.
> I'm asking these questions, because I recently noticed on the underlying
> libxml2 library's web site states that the xml schema support is
> incomplete (http://xmlsoft.org/index.html) and that it is being finished
> up (http://xmlsoft.org/news.html). To be fair, it appears that there
> are limitations with xerces schema validation support
> (http://xerces.apache.org/xerces-c/schema.html), too.
Given the complexity of the XML Schema standard, I would be surprised if there
was really an implementation that works 100% for all possible schemas. Note
that you can't actually prove that by testing. All you can prove is that there
are problems, not that there are none. That's why compliance test suites can
never be called complete.
Stefan
More information about the lxml-dev
mailing list