DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27803>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27803

DOMBuilder doesn't load Schema for validation, fails instead

           Summary: DOMBuilder doesn't load Schema for validation, fails
                    instead
           Product: Xerces-C++
           Version: 2.5.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Validating Parser (Schema) (Xerces 1.5 or up only)
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I want Xerces to validate documents against their schema, but I don't
want to depend on documents to contain hardcoded schema locations.

So I implemented an XMLEntityResolver in order to intercept SchemaGrammar
resolutions. However, this does not work, and the XMLEntityResolver is not
asked to resolve the schema namespaces. Validation then fails.

For some reason, it works if (a) you set the XercesSchemaExternalSchema-
Location property to point to random locations (which are being ignored),
and it also works if the document contains an xmi:schemaLocation attribute
for its namespace. I do not want to do either.

Test program, document and schemas attached. Expected output is "document
parsed okay.", preceded by messages from the entityResolver resolving some
SchemaGrammar and SchemaImport namespaces.

Current output is "document error." preceded by messages from the error
handler.

Problem verified with Xerces-C++ 2.5.0 on Windows 2000 / VC++ 6, but it
seems platform independent.

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

Reply via email to