You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Chris Storah (JIRA)" <xe...@xml.apache.org> on 2006/03/27 06:02:26 UTC

[jira] Commented: (XERCESC-1180) Add the possibility of loading a schema by just declaring a namespace binding

    [ http://issues.apache.org/jira/browse/XERCESC-1180?page=comments#action_12371933 ] 

Chris Storah commented on XERCESC-1180:
---------------------------------------

As a work around, I scan the XML document to locate the namespaces which are then compared against a look-up file to see which schemas to load in the grammar. The only reason this was done is because DOMEntityResolver did not trigger for all namespaces.

I am using version 2.7 and the option to trigger on all namespaces would be useful.

> Add the possibility of loading a schema by just declaring a namespace binding
> -----------------------------------------------------------------------------
>
>          Key: XERCESC-1180
>          URL: http://issues.apache.org/jira/browse/XERCESC-1180
>      Project: Xerces-C++
>         Type: New Feature
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 2.5.0
>  Environment: Operating System: All
> Platform: All
>     Reporter: Frank Pilhofer
>  Attachments: test.zip
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org