Sourceforge Project Site
 

DOMWriteTransformer

Transformer features and configuration

Overview

This transformer takes the stxx-created XML, converts it into a DOM tree, and stores it in a request, session, or application scope for use later. The request is then forwarded to "path" value. Most likely, the primary use of this transformer will be to create XML to be accessed by a JSP page. By storing the XML as a DOM node, JSTL's XML tags will be able to access the information easily with XPath.

Features

  • DOM can be stored in the request, session, or application scopes
  • Uses request dispatcher for further request handling
  • Works great with JSTL's XML tags

Configuration

Global

Global stxx.properties properties
Property Value Status
attributeName The name of the attribute the DOM will be stored under Optional (defaults to "stxxXML")
scope application | session | request (default) Optional

Transform-specific

These parameters are specified in stxx 1.2+ pipeline configuration format. See Configuring with Struts 1.1 for more information.

Transform-specific parameters
Parameter Value Status
path The path to forward to after the DOM is saved Required
attributeName The name of the attribute the DOM will be stored under Optional
scope application | session | request Optional
attachRequestParameters false | true (default) Optional
attachRequestAttributes false | true (default) Optional
attachForm false | true (default) Optional
attachResources false | true (default) Optional
attachErrors false | true (default) Optional
attachMessages false | true (default)

Examples

Global configuration:

stxx.transformer.dom.class=com.oroad.stxx.transform.DOMWriteTransformer
stxx.transformer.dom.attributeName=stxxXML
stxx.transformer.dom.scope=request

Transform-specific configuration:

<pipeline match="jsp/*.dox">
 <transform type="dom">
    <param name="path"     value="/{1}.jsp" />
 </transform>
</pipeline>

by Don Brown