[jdom-interest] RE: URIResolver and JDOMSource

Robert Koberg rob at koberg.com
Thu Nov 7 15:51:14 PST 2002

To follow up, I am pretty sure this is a bug in Resin. I can only get a File to
be used as a Source in the resolver.


> -----Original Message-----
> From: Robert Koberg [mailto:rob at koberg.com]
> Sent: Thursday, November 07, 2002 12:56 PM
> To: jdom-interest at jdom.org
> Subject: URIResolver and JDOMSource
> Hi,
> Just got JDOM this morning and most everything is working fine. The
> only problem I seem to be having is when I try to return JDOMSource
> for an XML doc that is determined by an URIResolver. I did a search
> in the searchable archives and browsed through a few months of posts
> but did not see anything addressing this.
> I am trying to cache some  XML as JDOM Documents. When an XSLT
> requests the file through something like
> <xsl:apply-templates select="document('users.xml')/users"/>
> The resolvers returns the JDOMSource. I believe I am returning the
> JDOMSource to the transformation. At least at the line before I
> return the JDOMSource the correct Document is there. It kinda looks like this:
> public Source resolve(String href,String base) {
>   XmlSourceManager srcman = Controller.source_manager;
>   if (href.equals("users.xml")) {
> System.out.println("srcman.getUsers(): " + srcman.getUsers());
>     // srcman.getUsers() returns the users.xml as a Document
>     return new JDOMSource(srcman.getUsers());
>   }
>   return null;
> }
> I was hoping someone else has done this and I making a stupid
> mistake. I am using Caucho's Resin servlet container and using their
> custom XSL compiler (it is kind of like Xalan's XSLTC). URI
> resolution is supposed to work like Saxon's. Before I go off and try
> this in other processors I wanted to ask here first.
> Any help would be greatly appreciated - Thanks!
>                                  Robert Koberg
>                                 liveSTORYBOARD
>                                   415-615-9079
>                                  San Francisco

More information about the jdom-interest mailing list