DO NOT REPLY [Bug 47671] New: unable to resolve a relative path

View: New views
4 Messages — Rating Filter:   Alert me  

DO NOT REPLY [Bug 47671] New: unable to resolve a relative path

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

           Summary: unable to resolve a relative path
           Product: XmlCommons
           Version: 1.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Resolver
        AssignedTo: commons-dev@...
        ReportedBy: dave.pawson@...


--- Comment #0 from Dave Pawson <dave.pawson@...> 2009-08-10 11:32:00 PDT ---
catalog entry of

 <system
      systemId="erlref.dtd"
      uri="/files/erlang/dtds/erlref.dtd"

     />

Is never seen by the resolver. See
http://www.sagehill.net/docbookxsl/WriteCatalog.html#ResolveDtdLoc


Yet http://xmlsoft.org/XSLT/xsltproc.html  catalog resolves this?

I.e. I think it should resolve appropriately

Marked as XSLTBug, since transform cannot take place
without DTD resolution


regards DaveP

--
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 47671] unable to resolve a relative path

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


Earl Hood <earl@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |earl@...


--- Comment #1 from Earl Hood <earl@...> 2009-08-10 16:27:31 PDT ---
What is the full catalog?
Does the path "/files/erlang/dtds/erlref.dtd" exist on
the filesystem?  Or have you set xml:base?

Have you tried setting the verbosity with the
xml.catalog.verbosity property. Set to 5 or larger to get maximum
verbosity.  This will determine if your catalog is actually getting
read and what the resolver does when resolving a uri.

What is the exact error message(s) you get?

If you can provide a reproducable test case, it will make
finding a solution faster.

BTW, I'm not an official maintainer of the resolver code,
but I had to dive into it over a year ago to fix bugs.
I believe some of my patches have been accepted, but
I do not think a new release of the resolver has been
done in quite some time.

--
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 47671] unable to resolve a relative path

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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



--- Comment #2 from Dave Pawson <dave.pawson@...> 2009-08-10 21:53:34 PDT ---
What is the full catalog?
Does the path "/files/erlang/dtds/erlref.dtd" exist on
the filesystem?  Or have you set xml:base?

Have you tried setting the verbosity with the
xml.catalog.verbosity property. Set to 5 or larger to get maximum
verbosity.  This will determine if your catalog is actually getting
read and what the resolver does when resolving a uri.

What is the exact error message(s) you get?

If you can provide a reproducable test case, it will make
finding a solution faster.

1. full catalog

<?xml version="1.0" encoding="utf-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
     >
 <system
      systemId="erlref.dtd"
      uri="/files/erlang/dtds/erlref.dtd"            />
 <systemSuffix
      systemIdSuffix="xhtml-lat1.ent"
      uri="/files/erlang/dtds/xhtml-lat1.ent"     />
</catalog>

2. The dtd and entity file are in ./dtds /files/erlang/dtds
3. I had tried xml:base, but now removed.

Instance has
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
a file of
<erlref> </erlref>

would test it.

I have CatalogManger.properties with verbosity set high.

Error reported is:

Parse catalog: erlang.catalog.xml                            
Loading catalog: erlang.catalog.xml
Default BASE: file:////files/erlang/erlang.catalog.xml
system: erlref.dtd
        /files/erlang/dtds/erlref.dtd
SYSTEM: erlref.dtd
        file:/files/erlang/dtds/erlref.dtd
systemSuffix: xhtml-lat1.ent
        /files/erlang/dtds/xhtml-lat1.ent
SYSTEM_SUFFIX: xhtml-lat1.ent
        file:/files/erlang/dtds/xhtml-lat1.ent
resolveSystem(file:/files/erlang/module.xsl)
resolveSystem(file:/files/erlang/erlang.xml)
resolveSystem(file:/files/erlang/erlref.dtd)
Error on line 2 column 37 of file:/files/erlang/erlang.xml:
  Error reported by XML parser: Cannot read from file:/files/erlang/erlref.dtd
(/files/erlang/erlref.dtd (No such file or directory))
Transformation failed: Run-time errors were reported

HTH

--
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 47671] unable to resolve a relative path

by Bugzilla from bugzilla@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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



--- Comment #3 from Earl Hood <earl@...> 2009-08-11 08:00:03 PDT ---
(In reply to comment #2)
> resolveSystem(file:/files/erlang/module.xsl)
> resolveSystem(file:/files/erlang/erlang.xml)
> resolveSystem(file:/files/erlang/erlref.dtd)

The above verbosity implies (to me) that the parser is passing
the wrong system ID to the resolver.

I.e. Instead of the XML parser passing just "erlref.dtd" to
the resolver, the parser is first fully qualifying the system ID
(probably based upon the current working directory)
before it passes the system ID to the resolver.  Since the
catalog has no entry for "file:/files/erlang/erlref.dtd", the
resolver will find no matching entries.

The parser then attempts to load the file directory, which of
course fails since the file does not exist with given path.

At this time, this appears to be an XML parser problem.
The parser should only be passing "erlref.dtd" to the
resolver.

BTW, did you trim some of the diagnostic output?  It seems
the XML parser is calling Catalog directly versus the
CatalogResolver class that implements the SAX EntityResolver
and JAXP URIResolver interfances.  I see no debugging messages
from the CatalogResolver class.

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