[xml] Multiple XML Schema Includes

I'm trying to validate a file against an XML Schema that includes the same schema file multiple times. libxml2 2.6.3 considers this a schema redefinition error. However, I believe this is a bug.

According the the spec, you are explicitly allowed to reinclude a schema. See http://www.w3.org/TR/xmlschema-1/#compound-schema, specifically the part at the bottom that says:

NOTE: The above is carefully worded so that multiple <include>ing of the same schema document will not constitute a violation of clause 2 of Schema Properties Correct (§3.15.6), but applications are allowed, indeed encouraged, to avoid<include>ing the same schema document more than once to forestall the necessity of establishing identity component by component.

While I take their encouragement to heart, I'm merely validating against a third-party schema here, so I'm unable to alter the schema design.

Do other people agree this is a bug in libxml2 or am I misreading the spec? I am far from an XML Schema expert.


adam trachtenberg
adam trachtenberg com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]