Posted By:
Doug_Erickson
Posted On:
Saturday, March 31, 2001 12:31 AM
Rather than getting the resource as a stream,
use
URL url = getClass().getResource(name);
Source xsl = new StreamSource(url.toExternalForm());
Transformer xform = factory.newTransformer(xsl);
When you supply the system ID, relative references will
be resolved with respect to it. When only the stream is
provided, the processor has no idea where the data is coming
from and can't resolve relative paths.