<?xml version="1.0"?>

<sx:resources xmlns:sx="http://www.servingxml.com/core"
              xmlns:myns="http://mycompany.com/mynames/">

  <sx:service id="wrap">
    <sx:wrap>
      <sx:xsltSerializer/>
      <envelope>
        <header>
          <sx:attribute name="mode" value="xml"/>
          <creationDate>
            <sx:currentDateTime/>
          </creationDate>
        </header>
        <body>
          <myns:books xmlns:myns="http://mycompany.com/mynames/"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="url2">
            <sx:transform>
              <sx:document/>
              <sx:processSubtree path="/myns:books/myns:book">
                <sx:choose>
                  <sx:when test="@categoryCode='F'">
                    <sx:transform/>
                  </sx:when>
                </sx:choose>
              </sx:processSubtree>
            </sx:transform>
          </myns:books>
        </body>
        <trailer>This is a trailer element</trailer>
      </envelope>
    </sx:wrap>
  </sx:service>

</sx:resources>

