You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xml-commons-dev@xerces.apache.org by bu...@apache.org on 2009/11/13 21:43:49 UTC

DO NOT REPLY [Bug 48194] New: Xml Catalog Resovler fails with included schemas

https://issues.apache.org/bugzilla/show_bug.cgi?id=48194

           Summary: Xml Catalog Resovler fails with included schemas
           Product: XmlCommons
           Version: 1.x
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Resolver
        AssignedTo: commons-dev@xml.apache.org
        ReportedBy: robert.streich@objectfx.com


If you attempt to include a schema into one that has a targetNamespace,
it fails to correctly resolve the included component. The problem is
with line ~420 of XMLCatalogResolver:

        // The namespace is useful for resolving namespace aware
        // grammars such as XML schema. Let it take precedence over
        // the external identifier if one exists.
        String namespace = resourceIdentifier.getNamespace();
        if (namespace != null) {
            resolvedId = resolveURI(namespace);
        }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48194] Xml Catalog Resovler fails with included schemas

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48194

Robert Streich <ro...@objectfx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robert.streich@objectfx.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48194] Xml Catalog Resovler fails with included schemas

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48194

--- Comment #1 from Robert Streich <ro...@objectfx.com> 2009-11-13 14:47:52 UTC ---
I don't know if this is viable, but this works:

        // The namespace is useful for resolving namespace aware
        // grammars such as XML schema. Let it take precedence over
        // the external identifier if one exists.
        String namespace = resourceIdentifier.getNamespace();
        if (namespace != null) {
           if (resourceIdentifier instanceof XSDDescription
                 && XSDDescription.CONTEXT_INCLUDE == ((XSDDescription)
resourceIdentifier).getContextType()) {
              resolvedId =
resolveSystem(resourceIdentifier.getLiteralSystemId());
           } else {
            resolvedId = resolveURI(namespace);
           }
        }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 48194] Xml Catalog Resovler fails with included schemas

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48194

--- Comment #2 from Robert Streich <ro...@objectfx.com> 2009-11-16 10:13:18 UTC ---
Created an attachment (id=24543)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24543)
Simple set up with included/imported schemas to illustrate bug.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.