In the following example, one XMLTransform servlet bean encloses another to produce a two-stage chained page transformation. Each XMLTransform servlet bean has a MIME type and encoding pair set in their respective <XSL:output> that is distinct from the other:

<dsp:droplet name="/atg/dynamo/droplet/xml/XMLTransform">
  <dsp:param name="input"    value="test-page.xml"/>
  <dsp:param name="template" value="../../doc.xsl"/>
  <dsp:oparam name="output">

    <dsp:droplet name="/atg/dynamo/droplet/xml/XMLTransform">
      <dsp:param name="input"  param="document"/>
      <dsp:param name="template"   value="../xhtml-xinclude.xsl"/>
      <dsp:param name="passParams" value="query"/>
      <dsp:oparam name="failure">
        <HTML>
          <HEAD>
            <TITLE>XML/XSL Error</TITLE>
          </HEAD>
          <BODY>
            <H1>XML/XSL Error processing <dsp:valueof param="input"></dsp:valueof>
            </H1>
          </BODY>
        </HTML>
      </dsp:oparam>
    </dsp:droplet>
  </dsp:oparam><%-- output --%>
  <dsp:oparam name="failure">
    <HTML>
      <HEAD>
        <TITLE>XML/XSL Error</TITLE>
      </HEAD>
      <BODY>
        <H1>XML/XSL Error processing <dsp:valueof param="input"></dsp:valueof>
        </H1>
      </BODY>
     </HTML>
  </dsp:oparam><%-- failure --%>
</dsp:droplet>

When the servlet beans are processed, the first XMLTransform writes its encoding and MIME type settings to the HTTP response object. Although those settings are applied to the content associated with that XMLTransform , they are overwritten immediately by the settings provided by the second XMLTransform . As a result, the settings provided by the second XMLTransform servlet bean are saved to the HTTP header and applied to the content associated to both the first and second XMLTransform servlet beans.

If the second XMLTransform references a stylesheet that does not explicitly set the encoding and MIME type, the values from the first XMLTransform persist and are applied to the content associated with the first and second XMLTransform servlet beans.

 
loading table of contents...