O'Reilly logo
  • Varun Vikas thinks this is interesting:

new javax.xml.transform.stream.StreamSource("foo.xsl"));

From

Cover of RESTful Java with JAX-RS 2.0, 2nd Edition

Note

newTransformer public abstract Transformer newTransformer(Source source) throws TransformerConfigurationException Process the Source into a Transformer Object. The Source is an XSLT document that conforms to XSL Transformations (XSLT) Version 1.0. Care must be taken not to use this Transformer in multiple Threads running concurrently. Different TransformerFactories can be used concurrently by different Threads.

Parameters: source - Source of XSLT document used to create Transformer. Examples of XML Sources include DOMSource, SAXSource, and StreamSource. Returns: A Transformer object that may be used to perform a transformation in a single Thread, never null. Throws: TransformerConfigurationEx...