XML Schema Validation with RelaxNG

后端 未结 5 1528
广开言路
广开言路 2021-02-05 11:53

Which XML validation tools can you recommend for both performance and accuracy, each of which is a critical issue on our system? We have the following requirements:

    <
相关标签:
5条回答
  • 2021-02-05 12:46

    I think that JDrago has the right idea, that you need to avoid libxml2-based tools for RNG validation, at least for now. I'm discovering this as well in my project. I recently logged two bugs against libxml2 concerning RNG validation.

    I recommend jing. It was written by James Clark, the creator of Relax NG and one of the leading lights in the XML world. He is also the author of trang, which you are already using. Development of this code (and of trang) recently resumed at the Google Code site I link to above.

    Jing has proved consistently correct with our content and schema, and to give much better error messages than libxml2, though there is still a lot of room for improvement in that regard.

    The one shortcoming of jing vis a vis libxml2/xmllint is that it doesn't at present use OASIS XML catalogs to resolve public and system identifiers and URIs pointing to schemas. This would be an issue in case you have included schemas that are referred to by 'http' URI--those would always be fetched over the network.

    0 讨论(0)
  • 2021-02-05 12:49

    Hamcrest Schema allows you to validate XML documents against RelaxNG using Hamcrest Matchers.

    0 讨论(0)
  • 2021-02-05 12:50

    rnv is very fast, free (as in free speech) and runs on the command line (so Perl can invoke it easily). Most of the times, the messages are OK. Unfortunately, it seems no longer maintained.

    0 讨论(0)
  • 2021-02-05 12:52

    i am the author of RNV. It is maintained on sourceforge.net, and there is a maintainer who takes care of both sourceforge and debian package builts. The fact is that the code is not changed is due to the code being stable. There are no bugs reported.

    0 讨论(0)
  • 2021-02-05 12:54

    I suspect xmllint uses the same underlying libraries (libxml2, etc) as anything else. It is counterintuitive to think that another front-end to the same library would give different results.

    0 讨论(0)
提交回复
热议问题