|
Subject: RE: [xsl] <xsl:include> using relative paths and Saxon 8 From: "Chris Ward" <cward@xxxxxxxxxxxxxxxxxxx> Date: Fri, 20 Jan 2006 16:48:52 -0000 |
> It's likely you'll need to call setSystemId() on the
> StreamSource, or on the TransformerHandler (if you are using
> either of them).
Err... okay - will look into this.
> If not, post the part of your code that loads the stylesheet.
Here's an outline of what I'm doing
- - - - - - - - - - - - - - - - - - - - - - - - - - -
URL url = new URL(xsltUrl);
URLConnection urlConn = url.openConnection();
InputStream is = urlConn.getInputStream();
Source xslSource = new StreamSource(is);
TransformerFactory transFact =
TransformerFactory.newInstance();
Templates templates = transFact.newTemplates(xslSource);
Transformer transformer = templates.newTransformer();
<snip>
DocumentSource source = new DocumentSource(getDocument());
DocumentResult result = new DocumentResult();
try {
transformer.transform(source, result);
if (DEBUG) {
System.out.println("transformer.transform()
succeeded");
}
}
catch (TransformerException ex) {
// transformation failed somehow - should log this
if (DEBUG) {
System.out.println("transformer.transform()
failed");
}
}
// should I have a finally block?
this.transformedDocument = result.getDocument();
- - - - - - - - - - - - - - - - - - - - - - - - - - -
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] <xsl:include> using relat, Pramod Biligiri | Thread | Re: [xsl] <xsl:include> using relat, andrew welch |
| RE: RE: RE: RE: RE: [xsl] html tabl, cknell | Date | Re: [xsl] <xsl:include> using relat, Pramod Biligiri |
| Month |