Sourceforge Project Site

XML Building

Advanced configuration


As a web application gets larger and more complex, the XML that stxx creates gets larger and larger. In order to optimize transformation performance, stxx allows you to configure what information will be attached to the XML in several ways: globally in, per transform (Struts 1.1+), and per Action. If information is configured to no be included in any of these places, the information will not be attached to the XML.

Stxx comes with a couple of different implementations. Each can have its own configuration properties in


Detailed global configuration can be found in the page.

Per Transform (Struts 1.1+)

If you are using stxx with Struts 1.1+ and are using the pipeline style of configuring transforms, you can specify in the transform definition what information should and should not be attached for any Transformer that uses stxx to build the XML (which is every Transformer included with stxx). The following transform parameters can be defined for a transform:

Transform parameters
Parameter Type of information
attachRequestParameters Request parameters
attachRequestAttributes Request attributes
attachResources Application resources for the current locale
attachForm The current action form for this Action
attachErrors The action errors for the current action form
attachMessages Action messages

Per Action

Within your action code, you can call stxx methods that will tell stxx to not attach information for the duration of the request. These methods can either be called locally from an Action that extends the stxx Action, or by using the StxxHelper class.

XML Building Methods
Method name Type of information
attachRequestParametersXML Request parameters
attachRequestAttributesXML Request attributes
attachResourcesXML Application resources for the current locale
attachFormXML The current action form for this Action
attachErrorsXML The action errors for the current action form
attachMessagesXML Action messages

by Don Brown