xml-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44263] New: - The XML resolver generates invalid file scheme URLs
Date Fri, 18 Jan 2008 08:40:22 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44263>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44263

           Summary: The XML resolver generates invalid file scheme URLs
           Product: XmlCommons
           Version: 1.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Resolver
        AssignedTo: commons-dev@xml.apache.org
        ReportedBy: kristian.spangsege@gmail.com


The resolver API as presented by 'org.apache.xerces.util.XMLCatalogResolver' has
a bug in that it generates invalid file scheme URIs with the prefix "file://".
The only valid prefixes are "file:/" and "file:///". This error causes Xerces to
reject the generated system IDs.

Assume the following catalog file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">

  <uri name="http://foo/bar" uri="foo/bar.xsd"/>

</catalog>


Assume further that this file is placed in "/home/me/". Then a resolution with
namespaceURI="http://foo/bar" gives an LSInput object with
systemId="file://home/me/foo/bar.xsd". When the resolver object is used with a
DOM 3 Xerces parser, these invalid URLs causes Xerces to reject them.


Whether this is a bug in Xerces' 'org.apache.xerces.util.XMLCatalogResolver' or
a bug in the resolver itself, I don't know.

Regards,
Kristian Spangsege

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

Mime
View raw message