Schema Import is noisy when schemaLocation is an abolute URI
------------------------------------------------------------
Key: TUSCANY-907
URL: http://issues.apache.org/jira/browse/TUSCANY-907
Project: Tuscany
Issue Type: Bug
Components: C++ SDO
Affects Versions: Java-M1
Reporter: Caroline Maynard
See http://pecl.php.net/bugs/bug.php?id=9243.
SDO for PHP user is importing a schema with import statements like
<import namespace="http://ping.chip.org/xml/pid"
schemaLocation="http://ping.chip.org/xml/pid.xsd"/>
These are unconventional, since the schemaLocation is not usually an absolute
URI, but they are valid.
They see a lot (I mean a lot) of warning messages like:
SDO_DAS_XML::create(http://ping.chip.org/phr/xml/http://ping.chip.org/phr/xml/types.xsd)
[function.SDO-DAS-XML-create]: failed to open stream:HTTP request failed!
HTTP/1.1 404 Not Found
where, as you can see, an invalid URI is being created and used. However the
schema is read successfully.
There are potentially quite a few issues here around the handling of libxml
error messages, but I'll restrict myself to the behaviour of
SDOSchemaSAX2Parser::startSecondaryParse
This tries to deal with four different ways to combine the path to the current
schema with the schemaLocation attribute of the import element. Eventually the
imported schema is found, but only after URIs like the one in the message above
are created and used.
I wasn't too happy with this particular method, so I perhaps went to the other
extreme with the patch I shall attach, where I let libxml combine the two
values according to RFC 2396. It works for me, but you may well have testcases
where it fails, and want to approach the problem some other way. Whether or not
you like the patch, I think something should be done to avoid the flurry of
warnings about ill-formed URIs like the above.
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]