Validate xsi:noNamespaceSchemaLocation
Status: Beta
Brought to you by:
bdumon
When validating you get an error:
unexpected attribute "xsi:noNamespaceSchemaLocation"
<root
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="any-URI-to-my.xsd"
>
...
</root>
That should not happen, as other external
xsd-conformance-checkers do right with that
and that's the official way.
Logged In: YES
user_id=679853
This seems to be a bug in Sun's MSV. I found a way to avoid
it by adding the two following methods in
org.outerj.pollo.xmleditor.schema.msv.PolloMsvVerifier (it
just ignores these errors):
/**
* signals an error.
*
* This method can be overrided by the derived class to
provide different behavior.
*/
protected ValidityViolation onError( StringRef ref, String
defaultMsg, ErrorInfo ei ) throws SAXException {
if ((ErrorInfo.BadAttribute.class.isInstance(ei))
&&
(((ErrorInfo.BadAttribute)ei).attLocalName.equals("noNamespaceSchemaLocation")))
{
return null;
} else {
return super.onError( ref, defaultMsg, ei );
}
}
protected ValidityViolation onError( String msg, ErrorInfo
ei ) throws SAXException {
if ((ErrorInfo.BadAttribute.class.isInstance(ei))
&&
(((ErrorInfo.BadAttribute)ei).attLocalName.equals("noNamespaceSchemaLocation")))
{
return null;
} else {
return super.onError( msg, ei );
}
}