[ 
https://issues.apache.org/jira/browse/XMLSCHEMA-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14126017#comment-14126017
 ] 

Daniel Kulp commented on XMLSCHEMA-35:
--------------------------------------

I'm still failing to see what the problem is.   If I do:

{code:java}
        XmlSchemaCollection schemaCol = new XmlSchemaCollection();
        XmlSchema schema = schemaCol.read(new 
InputSource("http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd";));
{code}

it properly resolves all the imports to the correct URL's.    Thus, I'm 
struggling to see the need for this.

In your example, the resolver has the full url in the schema location and thus 
the "base" is irrelevant.    In the second, the baseUri passed to the resolver 
is http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd which then 
would properly resolve to  
http://xbrl.fasb.org/us-gaap/2013/elts/us-types-2013-01-31.xsd.

> Multiple-Base URI Resolver
> --------------------------
>
>                 Key: XMLSCHEMA-35
>                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-35
>             Project: XmlSchema
>          Issue Type: New Feature
>    Affects Versions: 2.1.0
>            Reporter: Michael Pigott
>              Labels: PatchAvailable
>             Fix For: 2.1.1
>
>         Attachments: diff_multi_base_uri_resolver.zip
>
>
> When working with schemas across multiple namespaces and source URIs, 
> multiple XML Schemas may be given relative paths, but DefaultURIResolver only 
> supports one base URI.
> XmlSchemaMultiBaseUriResolver collects the base URIs of all schemas 
> encountered, and when a relative path is requested, will search all of the 
> base URIs looking for the XML Schema.  This search is conducted in 
> reverse-chronological-order of base-URI-added.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to