Re: [xml] validating schemas against XMLSchema.xsd



Hi,

Aamer Akhter wrote:
This may be a dumb question,

but how are folks on this list validating their xsd files?

xml2-config --version
2.6.9

xmllint --schema http://www.w3.org/2001/XMLSchema.xsd
http://www.w3.org/2001/XMLSchema.xsd > /dev/null

Unimplemented block at ../libxml2-2.6.9/xmlschemas.c:2265
Unimplemented block at ../libxml2-2.6.9/xmlschemas.c:2265
Unimplemented block at ../libxml2-2.6.9/xmlschemas.c:2265
Unimplemented block at ../libxml2-2.6.9/xmlschemas.c:2265
Unimplemented block at ../libxml2-2.6.9/xmlschemas.c:2265
Unimplemented block at ../libxml2-2.6.9/xmlschemas.c:2265
Unimplemented block at ../libxml2-2.6.9/xmlschemas.c:2265
Schemas parser error : Schemas: attribute anyattr 3 has no type nor reference
http://www.w3.org/2001/XMLSchema.xsd:484: element attribute: Schemas
parser error : Schemas: attribute name has no type nor reference
Schemas parser error : Schemas: attribute anyattr 97 has no type nor reference
Schemas parser error : Schemas: attribute anyattr 262 has no type nor reference
....


seems a chicken/egg problem ;-)

Yeah, I first thought as well that all the WXS processors used this
schema to validate other schemata. But since the rules for valid
schemata are intended to be hardcoded in libxml2, there's currently
no need to validate a user-defined schema by the schema for schemata.

Processing the schema for schemata would need special handling, as
mentioned in [1].

Theoretically the optimal thing would be to load the schema for schemata
as the meat of the validation rules + turn on all the additional rules,
and, voila, you have a schema processor.
Unfortunately this won't be very performant and mobile in C, since the
schema would have to be loaded on startup from _somewhere_. In Java
it may be more fun, since they can eat the schema and just bytecode
the produced objects.

[1] http://mail.gnome.org/archives/xml/2004-November/msg00109.html

Greetings,

Kasimier



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