Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-907

Schema Import is noisy when schemaLocation is an abolute URI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java-M1
    • Cpp-M3
    • C++ SDO
    • None
    • Patch Available

    Description

      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.

      Attachments

        1. Tuscany-907.patch
          3 kB
          Caroline Maynard

        Activity

          People

            Unassigned Unassigned
            cem Caroline Maynard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: