Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Canonicalization does not handle URI correctly

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT ibiblio.org>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Canonicalization does not handle URI correctly
  • Date: Fri, 25 Sep 2009 06:54:36 -0400

On Fri, Sep 25, 2009 at 3:37 AM, Timo Boehme <timo.boehme AT ontochem.com> wrote:
> I resend this post since my anonymous posting didn't made it to the list.
>
> Somewhere in 1.2.X version of XOM canonicalization of URIs where
> introduced in Builder. However the algorithm used assumes URL syntax
> which is too restrictive.
> I found the bug using a software which provides a jar-URI to read XML
> file from a jar archive. The URI looks like
> jar:file:/path/to/jar/archive.jar!/path/within/archive/data.xml
> The canonicalization algorithm changes this to
> jar://file:/path/to/jar/archive.jar!/path/within/archive/data.xml
> which results in MalformedURLException if the software tries to
> read jar from //file:/...
> So either canonicalization should use a white list for schemes to
> canonicalize or a black list for schemes which should not be touched or
> need to be extended to handle URIs.


What Dr. Kay said. You can probably do what you need to do by loading
the URL/JAR into a stream using Java's classes and then parsing the
stream.



--
Elliotte Rusty Harold
elharo AT ibiblio.org




Archive powered by MHonArc 2.6.24.

Top of Page