[Q] XML Schema validation

I want to validate a XML schema document in my application.

Is it correct to validate a XML schema document using *.xsd file 
identified by default namespace? Ex. The application applies the local
*.xsd file which is related with default namesapce.

If yes, how to validate using JAXP API which sets *.xsd file explicitly?

Or a XML schema document which is processed by the application needs
xsi:schemaLocation attribute value to identify *.xsd file?

I think an appliaction needs to process a XML schema document with
and without xsi:schemaLocation attribute, since it is optional.

Also it is possible *.xsd file is not available via the internet.
Ex. An Interoperable problem occurs if xsi:schemaLocation attribute
value has system dependent URI such as "D:\".

Therefore, I consider that it is better to validate a XML schema document
not using xsi:schemaLocation attribute but using default namespace.

Any help appriciated.

Koichi Emura

Received on Friday, 19 July 2002 02:15:40 UTC