ClassName

atg.droplet.xml.XMLTransform

Component

/atg/dynamo/droplet/xml/XMLTransform

The XMLTransform servlet bean enables you to transform XML documents using a template. The template can be either an XSLT template or a JSP. The document to be transformed is specified by the input parameter. The template to apply is specified (in order of precedence) by:

Input Parameters

input
The XML document to be transformed. This can be either the URL for an XML document, DOM document object, or SAX InputSource or a text InputStream.

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

Note that if the XML document does not have a DTD, you must omit this parameter.

template
Optional: Specifies the template to be used to transform the XML document. This can be either an XSLT template or a JSP. Both absolute paths and relative paths are accepted.

passParams
Optional: Specifies, when the template is an XSL stylesheet, 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.
Legal values are:

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.

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

Output Parameters

documentOuputName
Optional: The parameter to bind to the DOM document that results from the transformation. The default name is document.

errors
Optional: The parameter to bind to an enumeration of Exceptions if failures occurred when transforming the XML document.

Open Parameters

unset
Optional: Specifies the open parameter to render if the input parameter is not set.

output
Optional: Specifies the parameter used when the XML document is successfully transformed. If the output open parameter is specified, the document is not automatically output in the JSP.

failure
Optional: Specifies the parameter used to format output when there is a failure to transform the XML document.

Example

See Applying a Template to an XML Document.

 
loading table of contents...