I
Ian Pilcher
Here's something rather interesting. I was working on a quick program
to validate XML documents against W3C schemas, and it occurred to me
that it might not be a bad idea to validate the schemas themselves. And
since I was going to validating schemas, and I had the meta-schema
handy...
Anyway, it doesn't appear to work. I'm attaching the code as
text/plain to avoid word wrap problems. Here is the output:
Meta-schema parsed
Meta-schema compiled
ERROR: 'UndeclaredPrefix: Cannot resolve 'xs:anyType' as a QName: the
prefix 'xs' is not declared.'
The stack trace confirms that the exception occurs at
schemaValidator.validate(metaSchemaSource);
A quick look at the metaschema shows that the 'xs' prefix certainly
appears to be declared.
BTW, the meta-schema and its associated DTDs can be found at
http://www.w3.org/2001/XMLSchema
Anyone see an obvious error in the code?
TIA
to validate XML documents against W3C schemas, and it occurred to me
that it might not be a bad idea to validate the schemas themselves. And
since I was going to validating schemas, and I had the meta-schema
handy...
Anyway, it doesn't appear to work. I'm attaching the code as
text/plain to avoid word wrap problems. Here is the output:
Meta-schema parsed
Meta-schema compiled
ERROR: 'UndeclaredPrefix: Cannot resolve 'xs:anyType' as a QName: the
prefix 'xs' is not declared.'
The stack trace confirms that the exception occurs at
schemaValidator.validate(metaSchemaSource);
A quick look at the metaschema shows that the 'xs' prefix certainly
appears to be declared.
BTW, the meta-schema and its associated DTDs can be found at
http://www.w3.org/2001/XMLSchema
Anyone see an obvious error in the code?
TIA