Subject: [xsl] RE: URI Resolution for document('') Reference Is Broken? From: "Roger L. Cauvin" <roger@xxxxxxxxxx> Date: Wed, 6 Jan 2010 20:25:44 -0600 |
Andrew Houghton wrote: > This is what I did in a filter and it seems to work > fine. Granted it's a filter rather than a servlet, > but it shouldn't matter. > > private ServletContext context; > > String path = context.getRealPath(value); > File file = new File(path); > StreamSource src = new StreamSource(file); > > src.setSystemId(file.toURI().toURL().toString()); > log.info("transform location is " + path); > log.info("transform SystemId is " + src.getSystemId()); > > xf = tf.newTransformer(src); Andy, what are you doing in your stylesheets? My resolver works fine for xsl:include calls and calls to document() in which the parameter is not the empty string. It fails when document('') is called from a stylesheet that has been included by another stylesheet, however. -- Roger L. Cauvin @rcauvin (Twitter) cauvin.blogspot.com (blog)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] RE: URI Resolution for do, Houghton,Andrew | Thread | [xsl] re: recursive looping and var, Brian Newman |
RE: [xsl] RE: URI Resolution for do, Houghton,Andrew | Date | Re: [xsl] re: recursive looping and, Mukul Gandhi |
Month |