I am trying to validate a xml document with a schema using an external
schema in Java:

    20           String schemaURI = "file:///test.xsd";
    21           DOMParser parser = new DOMParser();
    22
parser.setFeature("http://xml.org/sax/features/validation";, true);
    23           parser.setProperty(
    24
"http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocat
ion",
    25              schemaURI);

I get:

[Error] :1:23: Document is invalid: no grammar found.
[Error] :1:23: Document root element "XXXX_INTERVAL_REQUEST", must match
DOCTYPE root "null"

I have tried different formats for the different schema uri value. None
make a difference.

I am using Xerces-J-bin.2.6.1 version.

Any suggestions? I would appreciate any help.

Thanks,
John


 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to