You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2010/07/19 14:33:43 UTC

DO NOT REPLY [Bug 49614] New: Add support for IRIs/URIs (with URI resolution and XML catalog support)

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

           Summary: Add support for IRIs/URIs (with URI resolution and XML
                    catalog support)
           Product: Batik
           Version: 1.8
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: (RFE) Request For Extension
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: jeremias@apache.org


ParsedURL basically just supports URLs right now (the Java Runtime's URL
protocols plus the RFC 2397 data URL protocol). It seems impossible to add URI
resolution with a connection to the user agent. In FOP, it was possible to pipe
image loading through FOP's URI resolution by registering an image bridge, but
that's not a general mechanism working for all external resources. It should be
possible to register a URIResolver (or EntityResolver) with Batik's user agent
so all IRI's are resolved through a central entity.

For comparison, FOP works like this: We provide a possibility to register a
URIResolver on FopFactory and user agent levels. First the user agent is
consulted (if a user agent is available in the context), then the URIResolver
on FopFactory is consulted. A URIResolver returns a Source object. If the
Source is a StreamSource and contains an InputStream, that is used. A DOMSource
is equally supported, if XML documents are loaded. Otherwise, the systemId is
assumed to be a URL which is then used via Java's own java.net.URL. If a URI
cannot be resolved by any URIResolver, it is assumed to be a URL and handled
appropriately.

I think this will require extensive changes all over Batik's codebase
(whereever a ParsedURL is instantiated), so this needs to be well thought
through. Due to time constraints I cannot work on this right now but have to
use an impractical work-around, so I just write this down as a reminder/wish.

References:
http://xml.apache.org/commons/components/resolver/index.html

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

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org