sorry for crossposting, but I'm not a hundred
percent sure
where to go with this issue.
I run C21 with a pretty FileGenerator that gives me
xml.xml [1] attached
right on. As next step in my pipeline I use
TraxTransformer(xalan, no XSLTC)
with xsl.xsl [2] to make some other xml out of it. Then I serialize everything with
XMLSerializer.
I do this quite often with different sources and
the same stylesheet. And it works
fine. But with the data enclosed I miss the third
node in output and I can't after a
hundred looks say why!?
Does anyone know why or where to direct my
question?
Thanks in advance
Michael
[1] source xml
[2] transformation
stylesheet
|
<?xml version="1.0" encoding="ISO-8859-1"?> <page> <include name="Z_3MDE_READ_CUSTOMIZING"> <import> <field name="OTYP">0003</field> </import> <export> <structure name="RETURN"> <field name="TYPE"/> <field name="CODE"/> <field name="MESSAGE"/> <field name="LOG_NO"/> <field name="LOG_MSG_NO">000000</field> <field name="MESSAGE_V1"/> <field name="MESSAGE_V2"/> <field name="MESSAGE_V3"/> <field name="MESSAGE_V4"/> </structure> </export> <tables> <table name="CUSTOMIZING"> <row id="1"> <field name="MANDT"/> <field name="ID">0000</field> <field name="PARAM">KEY</field> <field name="VALUE">AA</field> </row> <row id="2"> <field name="MANDT"/> <field name="ID">0000</field> <field name="PARAM">VALUE</field> <field name="VALUE">test</field> </row> <row id="3"> <field name="MANDT"/> <field name="ID">0001</field> <field name="PARAM">KEY</field> <field name="VALUE">AR</field> </row> <row id="4"> <field name="MANDT"/> <field name="ID">0001</field> <field name="PARAM">VALUE</field> <field name="VALUE">ABSTELLRAUM</field> </row> <row id="5"> <field name="MANDT"/> <field name="ID">0002</field> <field name="PARAM">KEY</field> <field name="VALUE">BA</field> </row> <row id="6"> <field name="MANDT"/> <field name="ID">0002</field> <field name="PARAM">VALUE</field> <field name="VALUE">BAD OHNE TÜRE</field> </row> <row id="7"> <field name="MANDT"/> <field name="ID">0003</field> <field name="PARAM">KEY</field> <field name="VALUE">BS</field> </row> <row id="8"> <field name="MANDT"/> <field name="ID">0003</field> <field name="PARAM">VALUE</field> <field name="VALUE">BACKSTUBE</field> </row> <row id="9"> <field name="MANDT"/> <field name="ID">0004</field> <field name="PARAM">KEY</field> <field name="VALUE">BT</field> </row> <row id="10"> <field name="MANDT"/> <field name="ID">0004</field> <field name="PARAM">VALUE</field> <field name="VALUE">BAD MIT TÜRE</field> </row> <row id="11"> <field name="MANDT"/> <field name="ID">0005</field> <field name="PARAM">KEY</field> <field name="VALUE">BU</field> </row> <row id="12"> <field name="MANDT"/> <field name="ID">0005</field> <field name="PARAM">VALUE</field> <field name="VALUE">BÜRO</field> </row> <row id="13"> <field name="MANDT"/> <field name="ID">0006</field> <field name="PARAM">KEY</field> <field name="VALUE">DG</field> </row> <row id="14"> <field name="MANDT"/> <field name="ID">0006</field> <field name="PARAM">VALUE</field> <field name="VALUE">DACHGESCHOSS</field> </row> <row id="15"> <field name="MANDT"/> <field name="ID">0007</field> <field name="PARAM">KEY</field> <field name="VALUE">EN</field> </row> <row id="16"> <field name="MANDT"/> <field name="ID">0007</field> <field name="PARAM">VALUE</field> <field name="VALUE">EINFAHRT NISCHE</field> </row> <row id="17"> <field name="MANDT"/> <field name="ID">0008</field> <field name="PARAM">KEY</field> <field name="VALUE">EZ</field> </row> <row id="18"> <field name="MANDT"/> <field name="ID">0008</field> <field name="PARAM">VALUE</field> <field name="VALUE">EINZELRAUM</field> </row> <row id="19"> <field name="MANDT"/> <field name="ID">0009</field> <field name="PARAM">KEY</field> <field name="VALUE">GA</field> </row> <row id="20"> <field name="MANDT"/> <field name="ID">0009</field> <field name="PARAM">VALUE</field> <field name="VALUE">GANG</field> </row> <row id="21"> <field name="MANDT"/> <field name="ID">0010</field> <field name="PARAM">KEY</field> <field name="VALUE">GD</field> </row> <row id="22"> <field name="MANDT"/> <field name="ID">0010</field> <field name="PARAM">VALUE</field> <field name="VALUE">GARDEROBE</field> </row> <row id="23"> <field name="MANDT"/> <field name="ID">0011</field> <field name="PARAM">KEY</field> <field name="VALUE">GE</field> </row> <row id="24"> <field name="MANDT"/> <field name="ID">0011</field> <field name="PARAM">VALUE</field> <field name="VALUE">GESCHÄFT</field> </row> <row id="25"> <field name="MANDT"/> <field name="ID">0012</field> <field name="PARAM">KEY</field> <field name="VALUE">GL</field> </row> <row id="26"> <field name="MANDT"/> <field name="ID">0012</field> <field name="PARAM">VALUE</field> <field name="VALUE">GLASHAUS</field> </row> <row id="27"> <field name="MANDT"/> <field name="ID">0013</field> <field name="PARAM">KEY</field> <field name="VALUE">GN</field> </row> <row id="28"> <field name="MANDT"/> <field name="ID">0013</field> <field name="PARAM">VALUE</field> <field name="VALUE">GANG-NISCHE</field> </row> <row id="29"> <field name="MANDT"/> <field name="ID">0014</field> <field name="PARAM">KEY</field> <field name="VALUE">GR</field> </row> <row id="30"> <field name="MANDT"/> <field name="ID">0014</field> <field name="PARAM">VALUE</field> <field name="VALUE">GASTRAUM</field> </row> <row id="31"> <field name="MANDT"/> <field name="ID">0015</field> <field name="PARAM">KEY</field> <field name="VALUE">HA</field> </row> <row id="32"> <field name="MANDT"/> <field name="ID">0015</field> <field name="PARAM">VALUE</field> <field name="VALUE">HALLE</field> </row> <row id="33"> <field name="MANDT"/> <field name="ID">0016</field> <field name="PARAM">KEY</field> <field name="VALUE">HF</field> </row> <row id="34"> <field name="MANDT"/> <field name="ID">0016</field> <field name="PARAM">VALUE</field> <field name="VALUE">HAUSFASSADE</field> </row> <row id="35"> <field name="MANDT"/> <field name="ID">0017</field> <field name="PARAM">KEY</field> <field name="VALUE">HH</field> </row> <row id="36"> <field name="MANDT"/> <field name="ID">0017</field> <field name="PARAM">VALUE</field> <field name="VALUE">HEIZHAUS</field> </row> <row id="37"> <field name="MANDT"/> <field name="ID">0018</field> <field name="PARAM">KEY</field> <field name="VALUE">HR</field> </row> <row id="38"> <field name="MANDT"/> <field name="ID">0018</field> <field name="PARAM">VALUE</field> <field name="VALUE">HEIZRAUM</field> </row> <row id="39"> <field name="MANDT"/> <field name="ID">0019</field> <field name="PARAM">KEY</field> <field name="VALUE">IF</field> </row> <row id="40"> <field name="MANDT"/> <field name="ID">0019</field> <field name="PARAM">VALUE</field> <field name="VALUE">IM FREIEN</field> </row> <row id="41"> <field name="MANDT"/> <field name="ID">0020</field> <field name="PARAM">KEY</field> <field name="VALUE">KA</field> </row> <row id="42"> <field name="MANDT"/> <field name="ID">0020</field> <field name="PARAM">VALUE</field> <field name="VALUE">KABINETT</field> </row> <row id="43"> <field name="MANDT"/> <field name="ID">0021</field> <field name="PARAM">KEY</field> <field name="VALUE">KE</field> </row> <row id="44"> <field name="MANDT"/> <field name="ID">0021</field> <field name="PARAM">VALUE</field> <field name="VALUE">KELLER</field> </row> <row id="45"> <field name="MANDT"/> <field name="ID">0022</field> <field name="PARAM">KEY</field> <field name="VALUE">KN</field> </row> <row id="46"> <field name="MANDT"/> <field name="ID">0022</field> <field name="PARAM">VALUE</field> <field name="VALUE">KOCHNISCHE</field> </row> <row id="47"> <field name="MANDT"/> <field name="ID">0023</field> <field name="PARAM">KEY</field> <field name="VALUE">KR</field> </row> <row id="48"> <field name="MANDT"/> <field name="ID">0023</field> <field name="PARAM">VALUE</field> <field name="VALUE">KAFFEERÖSTEREI</field> </row> <row id="49"> <field name="MANDT"/> <field name="ID">0024</field> <field name="PARAM">KEY</field> <field name="VALUE">KU</field> </row> <row id="50"> <field name="MANDT"/> <field name="ID">0024</field> <field name="PARAM">VALUE</field> <field name="VALUE">KÜCHE</field> </row> <row id="51"> <field name="MANDT"/> <field name="ID">0025</field> <field name="PARAM">KEY</field> <field name="VALUE">LA</field> </row> <row id="52"> <field name="MANDT"/> <field name="ID">0025</field> <field name="PARAM">VALUE</field> <field name="VALUE">LAGER</field> </row> <row id="53"> <field name="MANDT"/> <field name="ID">0026</field> <field name="PARAM">KEY</field> <field name="VALUE">LB</field> </row> <row id="54"> <field name="MANDT"/> <field name="ID">0026</field> <field name="PARAM">VALUE</field> <field name="VALUE">LABOR</field> </row> <row id="55"> <field name="MANDT"/> <field name="ID">0027</field> <field name="PARAM">KEY</field> <field name="VALUE">LO</field> </row> <row id="56"> <field name="MANDT"/> <field name="ID">0027</field> <field name="PARAM">VALUE</field> <field name="VALUE">LOKAL</field> </row> <row id="57"> <field name="MANDT"/> <field name="ID">0028</field> <field name="PARAM">KEY</field> <field name="VALUE">OR</field> </row> <row id="58"> <field name="MANDT"/> <field name="ID">0028</field> <field name="PARAM">VALUE</field> <field name="VALUE">ORDINATION</field> </row> <row id="59"> <field name="MANDT"/> <field name="ID">0029</field> <field name="PARAM">KEY</field> <field name="VALUE">RR</field> </row> <row id="60"> <field name="MANDT"/> <field name="ID">0029</field> <field name="PARAM">VALUE</field> <field name="VALUE">REGLERRAUM</field> </row> <row id="61"> <field name="MANDT"/> <field name="ID">0030</field> <field name="PARAM">KEY</field> <field name="VALUE">SO</field> </row> <row id="62"> <field name="MANDT"/> <field name="ID">0030</field> <field name="PARAM">VALUE</field> <field name="VALUE">SONSTIGES</field> </row> <row id="63"> <field name="MANDT"/> <field name="ID">0031</field> <field name="PARAM">KEY</field> <field name="VALUE">SR</field> </row> <row id="64"> <field name="MANDT"/> <field name="ID">0031</field> <field name="PARAM">VALUE</field> <field name="VALUE">SCHAURAUM</field> </row> <row id="65"> <field name="MANDT"/> <field name="ID">0032</field> <field name="PARAM">KEY</field> <field name="VALUE">SZ</field> </row> <row id="66"> <field name="MANDT"/> <field name="ID">0032</field> <field name="PARAM">VALUE</field> <field name="VALUE">SCHLAFZIMMER</field> </row> <row id="67"> <field name="MANDT"/> <field name="ID">0033</field> <field name="PARAM">KEY</field> <field name="VALUE">TK</field> </row> <row id="68"> <field name="MANDT"/> <field name="ID">0033</field> <field name="PARAM">VALUE</field> <field name="VALUE">TROCKENKAMMER</field> </row> <row id="69"> <field name="MANDT"/> <field name="ID">0034</field> <field name="PARAM">KEY</field> <field name="VALUE">TR</field> </row> <row id="70"> <field name="MANDT"/> <field name="ID">0034</field> <field name="PARAM">VALUE</field> <field name="VALUE">TECHNIKRAUM</field> </row> <row id="71"> <field name="MANDT"/> <field name="ID">0035</field> <field name="PARAM">KEY</field> <field name="VALUE">VZ</field> </row> <row id="72"> <field name="MANDT"/> <field name="ID">0035</field> <field name="PARAM">VALUE</field> <field name="VALUE">VORZIMMER</field> </row> <row id="73"> <field name="MANDT"/> <field name="ID">0036</field> <field name="PARAM">KEY</field> <field name="VALUE">WC</field> </row> <row id="74"> <field name="MANDT"/> <field name="ID">0036</field> <field name="PARAM">VALUE</field> <field name="VALUE">WC</field> </row> <row id="75"> <field name="MANDT"/> <field name="ID">0037</field> <field name="PARAM">KEY</field> <field name="VALUE">WE</field> </row> <row id="76"> <field name="MANDT"/> <field name="ID">0037</field> <field name="PARAM">VALUE</field> <field name="VALUE">WERKSTATT</field> </row> <row id="77"> <field name="MANDT"/> <field name="ID">0038</field> <field name="PARAM">KEY</field> <field name="VALUE">WK</field> </row> <row id="78"> <field name="MANDT"/> <field name="ID">0038</field> <field name="PARAM">VALUE</field> <field name="VALUE">WASCHKÜCHE</field> </row> <row id="79"> <field name="MANDT"/> <field name="ID">0039</field> <field name="PARAM">KEY</field> <field name="VALUE">WZ</field> </row> <row id="80"> <field name="MANDT"/> <field name="ID">0039</field> <field name="PARAM">VALUE</field> <field name="VALUE">WOHNZIMMER</field> </row> <row id="81"> <field name="MANDT"/> <field name="ID">0040</field> <field name="PARAM">KEY</field> <field name="VALUE">ZB</field> </row> <row id="82"> <field name="MANDT"/> <field name="ID">0040</field> <field name="PARAM">VALUE</field> <field name="VALUE">ZÄHLERBLOCK</field> </row> <row id="83"> <field name="MANDT"/> <field name="ID">0041</field> <field name="PARAM">KEY</field> <field name="VALUE">ZI</field> </row> <row id="84"> <field name="MANDT"/> <field name="ID">0041</field> <field name="PARAM">VALUE</field> <field name="VALUE">ZIMMER</field> </row> <row id="85"> <field name="MANDT"/> <field name="ID">0042</field> <field name="PARAM">KEY</field> <field name="VALUE">ZR</field> </row> <row id="86"> <field name="MANDT"/> <field name="ID">0042</field> <field name="PARAM">VALUE</field> <field name="VALUE">ZÄHLERRAUM</field> </row> </table> </tables> </include> </page>
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:param name="name"/> <xsl:key name="rows" match="row" use="[EMAIL PROTECTED]'ID']"/> <xsl:variable name="unique-rows" select="//[EMAIL PROTECTED]'ID'][not(.=preceding::field)]"/> <xsl:template match="/"> <table name="{$name}"> <xsl:apply-templates select="$unique-rows"/> </table> </xsl:template> <xsl:template match="field"> <xsl:variable name="val" select="."/> <row id="{position()}"> <field name="KEY"><xsl:value-of select="key('rows', $val)[1]/[EMAIL PROTECTED]'VALUE']"/></field> <field name="VALUE"><xsl:value-of select="key('rows', $val)[2]/[EMAIL PROTECTED]'VALUE']"/></field> </row> </xsl:template> </xsl:stylesheet>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]