You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Martin Gainty (JIRA)" <ji...@apache.org> on 2014/09/06 17:36:28 UTC
[jira] [Commented] (XMLSCHEMA-35) Multiple-Base URI Resolver
[ https://issues.apache.org/jira/browse/XMLSCHEMA-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14124534#comment-14124534 ]
Martin Gainty commented on XMLSCHEMA-35:
----------------------------------------
Michael
What is your expectation of base URI for XMLSchemas to be searched
other than default base URI?
> 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: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
Re: [jira] [Commented] (XMLSCHEMA-35) Multiple-Base URI Resolver
Posted by Michael Pigott <mp...@gmail.com>.
Hi Martin,
I'm not sure if you want me to reply to either the dev mailing list,
the JIRA ticket, or both - so I'll reply to both. The specific problem I'm
having is I want to parse XBRL documents. XBRL is an XML format for
companies to report their quarterly & annual financial reports in, with the
intent of making it easier for government agencies to detect fraudulent
statements.
The base XBRL schema is here:
http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd. It contains the
following import statement:
<import namespace="http://www.xbrl.org/2003/linkbase" schemaLocation="
xbrl-linkbase-2003-12-31.xsd"/>
As expected, the XML Schema for the linkbase namespace can be found at
http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd. So far so good.
However, the Securities and Exchange Commission (the U.S. regulatory agency
for companies on the stock market) define their own extensions to the XBRL
Schema here: http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd
These contain multiple import statements, including:
<xs:import namespace="http://www.xbrl.org/2003/instance" schemaLocation="
http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd"/>
<xs:import namespace="http://fasb.org/us-types/2013-01-31" schemaLocation="
us-types-2013-01-31.xsd"/>
Now we have a problem. The following schemas need to be reached:
http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd
xbrl-linkbase-2003-12-31.xsd (base URI of http://www.xbrl.org/2003/)
http://xbrl.fasb.org/us-gaap/2013/elts/us-gaap-2013-01-31.xsd
us-types-2013-01-31.xsd (Base URI of http://xbrl.fasb.org/us-gaap/2013/elts/
)
This is the problem I ran into, that XmlSchemaMultiBaseUriResolver solves.
Thanks,
Mike
On Sat, Sep 6, 2014 at 11:36 AM, Martin Gainty (JIRA) <ji...@apache.org>
wrote:
>
> [
> https://issues.apache.org/jira/browse/XMLSCHEMA-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14124534#comment-14124534
> ]
>
> Martin Gainty commented on XMLSCHEMA-35:
> ----------------------------------------
>
> Michael
>
> What is your expectation of base URI for XMLSchemas to be searched
> other than default base URI?
>
> > 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: dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: dev-help@ws.apache.org
>
>