Hi folks....I am stumped at how to do this. I have an xml file produced as an output from a java process. Similar to:
<root>
<child1>
<transaction name="sessionvars">
<datamap ID="1" name="sessionvars" rowcount="1">
<data rowcount="1">
<row number="1">
<col number="1" name="servername">127.0.0.1</col>
<col number="1" name="remotehost">127.0.0.1</col>
<col number="1" name="requestedsessionid">C56FA5B785419EF9BBE16E870FE515FB</col>
<col number="1" name="maxinactiveinterval">1800</col>
<col number="1" name="applicationname">test</col>
<col number="1" name="contextpath">/test</col>
<col number="1" name="creationtime">1118693895328</col>
<col number="1" name="requesturi">/test/transform</col>
<col number="1" name="pathinfo"></col>
<col number="1" name="authtype"></col>
<col number="1" name="serverport">8080</col>
<col number="1" name="scheme">http</col>
<col number="1" name="protocol">HTTP/1.1</col>
<col number="1" name="remoteuser"></col>
<col number="1" name="pathtranslated"></col>
<col number="1" name="servletpath">/transform</col>
<col number="1" name="sessionid">4ac34ed5-dc48-11d9-9f2c-a1f77389ec34</col>
<col number="1" name="lastaccessedtime">1118693895343</col>
<col number="1" name="remoteaddr">127.0.0.1</col>
</row>
</data>
</datamap>
</transaction>
<transaction name="select_data">
<datamap ID="1" name="db" rowcount="1">
<data rowcount="1">
<row number="1">
<col number="1" name="PK">1</col>
<col number="2" name="CID">006300000028CZ9AAM</col>
<col number="3" name="OID">006300000028CZ9AAM</col>
<col number="4" name="EXPIRATIONDATE">2005-06-15</col>
<col number="5" name="CONTACTNAME">Argentina Holdings-new trade lead</col>
</row>
</data>
</datamap>
</transaction>
</child1>
</root>
I want to exclude the first transaction type (sessionvars) and subsequent result tree from the xsl output. I want the second transaction type to output the result tree to a SOAP message from the same xsl.
I have been using the attached xslt as a template but cannot seem to: 1) get rid of the sessionvars result tree (although I have not used the exclude-result-prefixes declaration yet in the xsl:stylesheet declaraion), and 2) select the specific values of the second transaction to populate areas of the soap:Body.
Any insight would be greatly appreciated...
test_1.xml xml data
testxsl.xsl XSL Baseline
|