[xep-support] URL resolution
Werner Donné
werner.donne at re.be
Thu May 1 08:38:44 PDT 2003
John,
You can perhaps use URNs instead of URLs to address the images. In a URN you can
use your naming scheme. For this to work you have to provide a URLStreamHandler
and a URLConnection, which produce the streams. In the attached example you can
see how I added my own HTTP client.
The next step is exposing your protocol handler to the environment. The JDK
offers only a clumsy way to do that. You must define the system property
"java.protocol.handler.pkgs" to be a | separated list of package names in
which the protocol handler packages reside. Let's say, for example, that we
want to introduce the protocol "urn". A subdirectory "urn" containing the
handler and the connection class must exist in one of the packages specified
in the fore-mentioned system property.
After this URNs, will be considered valid by java.net.URL and the connection
manipulations for it will be directed to your classes for the complete JVM.
I think that implementing URLConnection.getInputStream() might be enough. In there
you make your connection with the database.
Regards,
Werner.
John Meyer wrote:
> Does xep provide any hooks to use application url resolution? Due to
> security and design considerations, our application uses and internal
> naming system and does not directly expose any of its contents via URL.
> Unforetunately, I can’t find any way to allow the xep pdf producer to
> find images in our database using our naming system. For xsl
> transformations, we use the JAXP URIResolver interface and related
> methods. I am hoping a similar solution could be used in the H4PDF class.
>
>
>
> John Meyer
>
> Senior Software Engineer
>
> Clinician Support Technology
>
>
>
--
Werner Donné -- Re BVBA
Engelbeekstraat 8
B-3300 Tienen
tel: (+32) 486 425803 e-mail: werner.donne at re.be
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Connection.java
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20030501/596d4a1f/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Handler.java
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20030501/596d4a1f/attachment-0001.ksh>
More information about the Xep-support
mailing list