Given an XML document and an XSLT or JSP template, transforms and outputs the XML document.

Class Name




Required Input Parameters


Optional Input Parameters


The XML document to transform, either the URL for an XML document, DOM document object, or SAX InputSource or a text InputStream. If omitted, the open parameter unset executes.


Determines whether the parser should validate this document against the DTD specified in the input parameter. Options include:

If the XML document lacks a DTD, you must omit this parameter.


The template to use to transform the XML document. This can be either an XSLT template or a JSP. Both absolute paths and relative paths are accepted.


When the template is an XSL stylesheet, sets a flag to control the passing of parameters from the request and servlet bean environment, to top-level <xsl:param> elements in the XSL stylesheet. Set to one of the following values:

If more than one parameter exists for a given name, only the first is passed. The order of parameter scopes is from local (within the XMLTransform servlet bean), up through other enclosing scopes, and eventually to the request query or post parameters.


The name of the parameter to which the input DOM Document is bound when using a JSP template. The default value is inputDocument.

Output Parameters


Set to the DOM document that results from the transformation. The default is document.


Set to an enumeration of Exceptions if failures occurred when transforming the XML document.

Open Parameters


Rendered if the input parameter is omitted.


Rendered when the XML document is transformed. If the output open parameter is specified, the document is not automatically output in the JSP.


Rendered when the XML document cannot be transformed.

Usage Notes

XMLTransform lets you transform XML documents with a template. The template can be either an XSLT template or a JSP. The document to transform is specified by the input parameter. The template to apply is determined in the following order of precedence:


See Applying a Template to an XML Document

Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices