DO NOT REPLY [Bug 44263] New: - The XML resolver generates invalid file scheme URLs

[email protected]
Newsgroups gmane.text.xml.commons.devel
Message-ID <[email protected]/bugzilla/>
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: [email protected]
        ReportedBy: [email protected]


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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.