Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-514

ValidateComponent does not create StreamSource with a SystemId which breaks schema includes and imports

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.1
    • 3.0
    • servicemix-components
    • None
    • Windows XP SP2, Ubuntu Linux 5.10, ServiceMix HEAD

    • Patch Available

    Description

      When creating a new schema object with a Source object the only way for Xalan/Xerces to resolve schema imports is via a SystemId which is an attribute on Source objects. Instantiating a StreamSource with an InputStream does not set this attribute and without this attribute being set schema imports and includes are not resolved correctly and an obscure message is returned:

      org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'USAddress' to a 'type definition' component.

      This is actually because the import/include failed. It is unfortunate that the error message is not more informative. A patch has been provided to fix this error and the ValidationTest test case updated to use a simple hierarchical directory layout.

      NOTE: the attached zip file has two patches and a new directory and xsd. The layout is as from the servicemix-components directory.

      Attachments

        Activity

          People

            grantm Grant Mcdonald
            grantm Grant Mcdonald
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.25h
                0.25h
                Remaining:
                Remaining Estimate - 0.25h
                0.25h
                Logged:
                Time Spent - Not Specified
                Not Specified