GNOME Bugzilla – Bug 167289
oasis-xml-catalog processing instruction broken with schema validation
Last modified: 2010-05-11 22:06:44 UTC
Please describe the problem: Hello, When running: xmllint --noout --schema schemata/TestReport.xsd templates/testReport.xml where templates/testReport.xml at the very beginning contains: <?xml version="1.0" encoding="UTF-8" ?> <?oasis-xml-catalog catalog="../catalog.xml" ?> <!-- Copyright (C) 2004 Frans I get the following with XML_DEBUG_CATALOG set: bash-2.05b$ xmllint --noout --schema schemata/TestReport.xsd templates/testReport.xml Resolve: sysID http://defense.sf.net/NS/TestOutput.xsd Failed to parse catalog file:///etc/xml/catalog Resolve URI http://defense.sf.net/NS/TestOutput.xsd warning: failed to load external entity "http://defense.sf.net/NS/TestOutput.xsd" schemata/TestReport.xsd:186: element element: Schemas parser error : Element ref. 'output:testOutput', attribute 'ref': The QName value {'http://defense.sf.net/NS/TestOutput', 'testOutput'} does not resolve to a(n) element declaration. WXS schema schemata/TestReport.xsd failed to compile Adding document catalog ../catalog.xml <---------------- Free catalog entry ../catalog.xml Catalogs cleanup Free catalog entry bash-2.05b$ It appears like loading the document catalog happens after the document was validated, which prevents the loading of schema URIs to be mapped. Cheers, Frans Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Sounds dangerous to me to expect the document to be validated to be where you find informations about how to validate it, DTD inherited this from SGML but it's an ancient behaviour. oasis-xml-catalog catalogs are as far as I can tell only defined to influence the current document entity resolution, not entity resolution for other XML files which might be related. Doing so would be serious hazard, it would make very easy to bypass any validation layer. I doubt it can be considered as a bug, I would check the Relax-NG spec but www.oasis-open.org seems to have troubles serving it. Daniel
You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you please check again if the issue you reported here still happens in a recent version and update this report by adding a comment and adjusting the 'Version' field? Again thank you for reporting this and sorry that it could not be fixed for the version you originally used here. Set to NEEDINFO, so without feedback this report will be closed as INCOMPLETE after 6 weeks.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!