DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8293>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8293

OutOfMemory Error for XalanJ2.3.0 but not in earlier release (XalanJ2.2.D11)

           Summary: OutOfMemory Error for XalanJ2.3.0 but not in earlier
                    release (XalanJ2.2.D11)
           Product: XalanJ2
           Version: 2.3
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Xalan
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


It seems that the new version XalanJ2.3.0 allocates much more memory then the 
older version XalanJ2.2D11. With big (not really big, only 686KB) input files 
it goes out of memory durning transformation. This is also the case with the 
newest version 2.3.1.

With the old version 2.2.D11 I could translate files up to 4 MB.

I append here my stylesheet and a small input file. In order to get the input 
file in its original size you must copy the node Message/DATA/Transaction 330 
times.

Thank you for fixing this bug.
Best regards
Urban


BEGIN OF STYLESHEET:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <!--
********************************************************************************
********************************-->
        <!--* Created by RowsetToMappingXSL.xsl  Version 
1.0                                                                *-->
        <!--* Can be used for Transformations from MUC:Transaction into 
P11:Transaction-->
        <!--
*                                                                               
                                                                    *-->
        <!--* Value formatting support is set 
to 'true'.                                                                      
             *-->
        <!--
********************************************************************************
********************************-->
        <xsl:output encoding="ISO-8859-1" indent="yes" method="xml"/>
        <xsl:variable name="domainValueMappingXml" select="document
('MUC_DomainValueMapping.xml')"/>
        <!--Formatter object variables-->
        <!--Templates-->
        <xsl:template match="/">
                <xsl:apply-templates/>
        </xsl:template>
        <xsl:template match="node()|@*">
                <!--This template will be applyed only to elements/attributes 
which are not descendants of DATA or REQUESTS nor DATA or REQUESTS self-->
                <xsl:copy>
                        <xsl:apply-templates select="@*|node()"/>
                </xsl:copy>
        </xsl:template>
        <xsl:template match="REQUESTS">
                <xsl:element name="REQUESTS">
                        <xsl:apply-templates mode="num34" 
select="./Transaction"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA">
                <xsl:element name="DATA">
                        <xsl:apply-templates mode="num34" 
select="./Transaction"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction | REQUESTS/Transaction" 
mode="num34">
                <xsl:element name="Transaction">
                        <xsl:copy-of select="_PRIVATE_[1]"/>
                        <xsl:apply-templates mode="num1" 
select="./InventoryTransaction"/>
                        <xsl:apply-templates mode="num6" select="./Movements"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction/InventoryTransaction | 
REQUESTS/Transaction/InventoryTransaction" mode="num1">
                <xsl:element name="InventoryTransaction">
                        <xsl:copy-of select="_PRIVATE_[1]"/>
                        <xsl:apply-templates mode="num2" 
select="./TransactionType"/>
                        <xsl:apply-templates mode="num5" 
select="./TransactionDate"/>
                        <xsl:apply-templates mode="num9" select="./TradeDate"/>
                        <xsl:apply-templates mode="num10" select="./ValueDate"/>
                        <xsl:apply-templates mode="num12" 
select="./StockExchange"/>
                        <xsl:apply-templates mode="num14" select="./Broker"/>
                        <xsl:apply-templates mode="num16" 
select="./Counterparty"/>
                        <xsl:apply-templates mode="num18" 
select="./ExternalReference"/>
                        <xsl:apply-templates mode="num20" 
select="./TransactionType"/>
                        <xsl:apply-templates mode="num22" 
select="./TransactionStatus"/>
                        <xsl:apply-templates mode="num24" 
select="./ReversalType"/>
                        <xsl:apply-templates mode="num26" 
select="./PortfolioName"/>
                        <xsl:apply-templates mode="num28" 
select="./ExternalPortfolioName"/>
                        <xsl:apply-templates mode="num30" select="./Currency"/>
                        <xsl:apply-templates mode="num32" 
select="./TransactionValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/InventoryTransaction/TransactionType | 
REQUESTS/Transaction/InventoryTransaction/TransactionType" mode="num2">
                <xsl:element name="EditFunction">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:call-template name="domainValueLookup">
                                        <xsl:with-param name="srcNamespace" 
select="'MUC'"/>
                                        <xsl:with-param name="dstNamespace" 
select="'P11'"/>
                                        <xsl:with-param name="srcDomain" 
select="'TransactionType_BA'"/>
                                        <xsl:with-param name="dstDomain" 
select="'EditFunctionDependingOnBA'"/>
                                        <xsl:with-param name="srcValue" 
select="child::text()"/>
                                </xsl:call-template>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/InventoryTransaction/TransactionDate | 
REQUESTS/Transaction/InventoryTransaction/TransactionDate" mode="num5">
                <xsl:element name="TransactionDate">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:call-template name="domainValueLookup">
                                        <xsl:with-param name="srcNamespace" 
select="'MUC'"/>
                                        <xsl:with-param name="dstNamespace" 
select="'P11'"/>
                                        <xsl:with-param name="srcDomain" 
select="'DateTime'"/>
                                        <xsl:with-param name="dstDomain" 
select="'Date'"/>
                                        <xsl:with-param name="srcValue" 
select="child::text()"/>
                                </xsl:call-template>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction/InventoryTransaction/TradeDate | 
REQUESTS/Transaction/InventoryTransaction/TradeDate" mode="num9">
                <xsl:element name="TradeDate">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:call-template name="domainValueLookup">
                                        <xsl:with-param name="srcNamespace" 
select="'MUC'"/>
                                        <xsl:with-param name="dstNamespace" 
select="'P11'"/>
                                        <xsl:with-param name="srcDomain" 
select="'DateTime'"/>
                                        <xsl:with-param name="dstDomain" 
select="'Date'"/>
                                        <xsl:with-param name="srcValue" 
select="child::text()"/>
                                </xsl:call-template>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction/InventoryTransaction/ValueDate | 
REQUESTS/Transaction/InventoryTransaction/ValueDate" mode="num10">
                <xsl:element name="ValueDate">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:call-template name="domainValueLookup">
                                        <xsl:with-param name="srcNamespace" 
select="'MUC'"/>
                                        <xsl:with-param name="dstNamespace" 
select="'P11'"/>
                                        <xsl:with-param name="srcDomain" 
select="'DateTime'"/>
                                        <xsl:with-param name="dstDomain" 
select="'Date'"/>
                                        <xsl:with-param name="srcValue" 
select="child::text()"/>
                                </xsl:call-template>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/InventoryTransaction/StockExchange | 
REQUESTS/Transaction/InventoryTransaction/StockExchange" mode="num12">
                <xsl:element name="StockExchange">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction/InventoryTransaction/Broker | 
REQUESTS/Transaction/InventoryTransaction/Broker" mode="num14">
                <xsl:element name="Broker">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction/InventoryTransaction/Counterparty 
| REQUESTS/Transaction/InventoryTransaction/Counterparty" mode="num16">
                <xsl:element name="Counterparty">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/InventoryTransaction/ExternalReference | 
REQUESTS/Transaction/InventoryTransaction/ExternalReference" mode="num18">
                <xsl:element name="ExternalReference">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/InventoryTransaction/TransactionType | 
REQUESTS/Transaction/InventoryTransaction/TransactionType" mode="num20">
                <xsl:element name="TransactionType">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:call-template name="domainValueLookup">
                                        <xsl:with-param name="srcNamespace" 
select="'MUC'"/>
                                        <xsl:with-param name="dstNamespace" 
select="'P11'"/>
                                        <xsl:with-param name="srcDomain" 
select="'TransactionType_BA'"/>
                                        <xsl:with-param name="dstDomain" 
select="'TransactionType_TRX'"/>
                                        <xsl:with-param name="srcValue" 
select="child::text()"/>
                                </xsl:call-template>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/InventoryTransaction/TransactionStatus | 
REQUESTS/Transaction/InventoryTransaction/TransactionStatus" mode="num22">
                <xsl:element name="TransactionStatus">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction/InventoryTransaction/ReversalType 
| REQUESTS/Transaction/InventoryTransaction/ReversalType" mode="num24">
                <xsl:element name="ReversalType">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/InventoryTransaction/PortfolioName | 
REQUESTS/Transaction/InventoryTransaction/PortfolioName" mode="num26">
                <xsl:element name="PortfolioName">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/InventoryTransaction/ExternalPortfolioName | 
REQUESTS/Transaction/InventoryTransaction/ExternalPortfolioName" mode="num28">
                <xsl:element name="ExternalPortfolioName">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction/InventoryTransaction/Currency | 
REQUESTS/Transaction/InventoryTransaction/Currency" mode="num30">
                <xsl:element name="Currency">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/InventoryTransaction/TransactionValue | 
REQUESTS/Transaction/InventoryTransaction/TransactionValue" mode="num32">
                <xsl:element name="TransactionValue">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction/Movements | 
REQUESTS/Transaction/Movements" mode="num6">
                <xsl:element name="Movements">
                        <xsl:copy-of select="_PRIVATE_[1]"/>
                        <xsl:apply-templates mode="num3" 
select="./InventoryMovement"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction/Movements/InventoryMovement | 
REQUESTS/Transaction/Movements/InventoryMovement" mode="num3">
                <xsl:element name="InventoryMovement">
                        <xsl:copy-of select="_PRIVATE_[1]"/>
                        <xsl:apply-templates mode="num4" 
select="./MovementType"/>
                        <xsl:apply-templates mode="num7" 
select="./CustodyAccount"/>
                        <xsl:apply-templates mode="num8" 
select="./ExternalCustodyAccount"/>
                        <xsl:apply-templates mode="num11" 
select="./CustodyLocation"/>
                        <xsl:apply-templates mode="num13" select="./Principal"/>
                        <xsl:apply-templates mode="num15" 
select="./Identifier"/>
                        <xsl:apply-templates mode="num17" 
select="./IdentifierSystem"/>
                        <xsl:apply-templates mode="num19" 
select="./AccountIdentifier"/>
                        <xsl:apply-templates mode="num21" 
select="./QuantityNominalContract"/>
                        <xsl:apply-templates mode="num23" 
select="./PriceCurrency"/>
                        <xsl:apply-templates mode="num25" select="./PriceType"/>
                        <xsl:apply-templates mode="num27" 
select="./PriceYieldInterest"/>
                        <xsl:apply-templates mode="num29" select="./Value"/>
                        <xsl:apply-templates mode="num31" 
select="./ValueCurrency"/>
                        <xsl:apply-templates mode="num33" 
select="./ExchangeRate"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/MovementType | 
REQUESTS/Transaction/Movements/InventoryMovement/MovementType" mode="num4">
                <xsl:element name="MovementType">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:call-template name="domainValueLookup">
                                        <xsl:with-param name="srcNamespace" 
select="'MUC'"/>
                                        <xsl:with-param name="dstNamespace" 
select="'P11'"/>
                                        <xsl:with-param name="srcDomain" 
select="'MovementType_BA'"/>
                                        <xsl:with-param name="dstDomain" 
select="'MovementType_MOV'"/>
                                        <xsl:with-param name="srcValue" 
select="child::text()"/>
                                </xsl:call-template>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/CustodyAccount | 
REQUESTS/Transaction/Movements/InventoryMovement/CustodyAccount" mode="num7">
                <xsl:element name="CustodyAccount">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/ExternalCustodyAccount | 
REQUESTS/Transaction/Movements/InventoryMovement/ExternalCustodyAccount" 
mode="num8">
                <xsl:element name="ExternalCustodyAccount">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/CustodyLocation | 
REQUESTS/Transaction/Movements/InventoryMovement/CustodyLocation" mode="num11">
                <xsl:element name="CustodyLocation">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/Principal | 
REQUESTS/Transaction/Movements/InventoryMovement/Principal" mode="num13">
                <xsl:element name="Principal">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/Identifier | 
REQUESTS/Transaction/Movements/InventoryMovement/Identifier" mode="num15">
                <xsl:element name="Identifier">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:call-template name="domainValueLookup">
                                        <xsl:with-param name="srcNamespace" 
select="'MUC'"/>
                                        <xsl:with-param name="dstNamespace" 
select="'P11'"/>
                                        <xsl:with-param name="srcDomain" 
select="'Identifier'"/>
                                        <xsl:with-param name="dstDomain" 
select="'Identifier'"/>
                                        <xsl:with-param name="srcValue" 
select="child::text()"/>
                                </xsl:call-template>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/IdentifierSystem | 
REQUESTS/Transaction/Movements/InventoryMovement/IdentifierSystem" mode="num17">
                <xsl:element name="IdentifierSystem">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/AccountIdentifier | 
REQUESTS/Transaction/Movements/InventoryMovement/AccountIdentifier" 
mode="num19">
                <xsl:element name="AccountIdentifier">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/QuantityNominalContract | 
REQUESTS/Transaction/Movements/InventoryMovement/QuantityNominalContract" 
mode="num21">
                <xsl:element name="QuantityNominalContract">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/PriceCurrency | 
REQUESTS/Transaction/Movements/InventoryMovement/PriceCurrency" mode="num23">
                <xsl:element name="PriceCurrency">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/PriceType | 
REQUESTS/Transaction/Movements/InventoryMovement/PriceType" mode="num25">
                <xsl:element name="PriceType">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/PriceYieldInterest | 
REQUESTS/Transaction/Movements/InventoryMovement/PriceYieldInterest" 
mode="num27">
                <xsl:element name="PriceYieldInterest">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template match="DATA/Transaction/Movements/InventoryMovement/Value 
| REQUESTS/Transaction/Movements/InventoryMovement/Value" mode="num29">
                <xsl:element name="Value">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/ValueCurrency | 
REQUESTS/Transaction/Movements/InventoryMovement/ValueCurrency" mode="num31">
                <xsl:element name="ValueCurrency">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <xsl:template 
match="DATA/Transaction/Movements/InventoryMovement/ExchangeRate | 
REQUESTS/Transaction/Movements/InventoryMovement/ExchangeRate" mode="num33">
                <xsl:element name="ExchangeRate">
                        <xsl:variable name="dstValueTemp1">
                                <xsl:value-of select="child::text()"/>
                        </xsl:variable>
                        <xsl:variable name="dstValueTemp2">
                                <xsl:value-of select="$dstValueTemp1"/>
                        </xsl:variable>
                        <xsl:variable name="dstValue">
                                <xsl:value-of select="$dstValueTemp2"/>
                        </xsl:variable>
                        <xsl:value-of select="$dstValue"/>
                </xsl:element>
        </xsl:template>
        <!-- Helper function for domain value lookup as named xsl:template -->
        <xsl:template name="domainValueLookup">
                <xsl:param name="srcNamespace"/>
                <xsl:param name="dstNamespace"/>
                <xsl:param name="srcDomain"/>
                <xsl:param name="dstDomain"/>
                <xsl:param name="srcValue"/>
                <xsl:variable name="srcValueLookup">
                        <xsl:choose>
                                <xsl:when test="string($srcValue)=''">
                                        <xsl:value-of select="'[NULL]'"/>
                                </xsl:when>
                                <xsl:otherwise>
                                        <xsl:value-of select="$srcValue"/>
                                </xsl:otherwise>
                        </xsl:choose>
                </xsl:variable>
                <xsl:variable name="valueMappings" 
select="$domainValueMappingXml/DOMAINMAPPINGS/DomainMapping
[SrcNamespace=$srcNamespace and SrcDomain=$srcDomain and 
DstNamespace=$dstNamespace and 
DstDomain=$dstDomain]/VALUEMAPPINGS/ValueMapping"/>
                <xsl:variable name="dstValueLookup" select="$valueMappings
[SrcValue=$srcValueLookup and (SrcDirection='bidir' or SrcDirection='from') and 
(DstDirection='bidir' or DstDirection='to')]/DstValue"/>
                <xsl:choose>
                        <xsl:when test="$valueMappings">
                                <xsl:choose>
                                        <xsl:when test="$dstValueLookup">
                                                <xsl:choose>
                                                        <xsl:when 
test="$dstValueLookup='[NULL]'">
                                                                <xsl:value-of 
select="''"/>
                                                        </xsl:when>
                                                        <xsl:otherwise>
                                                                <xsl:value-of 
select="$dstValueLookup"/>
                                                        </xsl:otherwise>
                                                </xsl:choose>
                                        </xsl:when>
                                        <xsl:otherwise>
                                                <xsl:value-of select="concat
('DOMAIN_VALUE_NOT_FOUND_ERROR(', $srcValue, ')')"/>
                                                <xsl:message>WARNING: Domain-
Value (<xsl:value-of select="$srcDomain"/>.<xsl:value-of select="$srcValue"/>) 
not found.</xsl:message>
                                        </xsl:otherwise>
                                </xsl:choose>
                        </xsl:when>
                        <xsl:otherwise>
                                <!-- No value mappings => domains only for 
formatting -->
                                <xsl:value-of select="$srcValue"/>
                        </xsl:otherwise>
                </xsl:choose>
        </xsl:template>
</xsl:stylesheet>
END OF STYLESHEET!

BEGIN OF INPUT XML (for original size copy "Transaction" node 334 times):
<?xml version="1.0" encoding="ISO-8859-1"?>
<Message version="0.3">
        <Header>
                <MessageType>MyMessage</MessageType>
                <Method>map</Method>
                <RequestId/>
                <DestinationProcessorName>Paraload</DestinationProcessorName>
                <PROCESSORS>
                        <Processor>
                                <Sequence>0</Sequence>
                                <Name>MucExtract</Name>
                                <Mode>map</Mode>
                                <Date>2002-01-21 11:48:21.026</Date>
                                <MessageId>62BD46C0-0E5C-11D6-CB8B-
A18984605807</MessageId>
                        </Processor>
                </PROCESSORS>
        </Header>
        <Metadata/>
        <REQUESTS>
                <Transaction>
                        <InventoryTransaction>
                        
        <ExternalReference>SER521002037</ExternalReference>
                                <TransactionType>63</TransactionType>
                        </InventoryTransaction>
                        <Movements/>
                </Transaction>
        </REQUESTS>
        <DATA>
                <Transaction>
                        <InventoryTransaction>
                                <EditFunction>U</EditFunction>
                                <TransactionDate>23.07.2001 
00:00</TransactionDate>
                                <TradeDate>23.07.2001 00:00</TradeDate>
                                <ValueDate>25.07.2001 00:00</ValueDate>
                                <StockExchange/>
                                <Broker>WESTLB</Broker>
                                <Counterparty>WESTLB</Counterparty>
                        
        <ExternalReference>SER521002037</ExternalReference>
                                <TransactionType>63</TransactionType>
                                <TransactionStatus>7</TransactionStatus>
                                <ReversalType>0</ReversalType>
                                <PortfolioName>530</PortfolioName>
                                <ExternalPortfolioName>SLAM-
SLM1</ExternalPortfolioName>
                                <Currency>EUR</Currency>
                                <TransactionValue>-852292.40</TransactionValue>
                        </InventoryTransaction>
                        <Movements>
                                <InventoryMovement>
                                        <MovementType>63</MovementType>
                                        <CustodyAccount>Sperrdepot 
LoosingNerve</CustodyAccount>
                                        <ExternalCustodyAccount>41 99 789 
316</ExternalCustodyAccount>
                                
        <CustodyLocation>WESTLB</CustodyLocation>
                                        <Principal>Y</Principal>
                                        <Identifier>00005140000</Identifier>
                                        <IdentifierSystem>4</IdentifierSystem>
                                        <AccountIdentifier/>
                                
        <QuantityNominalContract>10000.000</QuantityNominalContract>
                                        <PriceCurrency>EUR</PriceCurrency>
                                        <PriceType>1</PriceType>
                                
        <PriceYieldInterest>83.05</PriceYieldInterest>
                                        <Value>830500</Value>
                                        <ValueCurrency>EUR</ValueCurrency>
                                        <ExchangeRate>1.0</ExchangeRate>
                                </InventoryMovement>
                                <InventoryMovement>
                                        <MovementType>DEBIT</MovementType>
                                        <CustodyAccount/>
                                        <ExternalCustodyAccount/>
                                        <CustodyLocation/>
                                        <Principal>N</Principal>
                                        <Identifier/>
                                        <IdentifierSystem/>
                                        <AccountIdentifier>530-
1020000</AccountIdentifier>
                                        <QuantityNominalContract>-
830500</QuantityNominalContract>
                                        <PriceCurrency>EUR</PriceCurrency>
                                        <PriceType>1</PriceType>
                                
        <PriceYieldInterest>1.0</PriceYieldInterest>
                                        <Value>-830500</Value>
                                        <ValueCurrency>EUR</ValueCurrency>
                                        <ExchangeRate>1.0</ExchangeRate>
                                </InventoryMovement>
                                <InventoryMovement>
                                        <MovementType>001</MovementType>
                                        <CustodyAccount/>
                                        <ExternalCustodyAccount/>
                                        <CustodyLocation/>
                                        <Principal>N</Principal>
                                        <Identifier/>
                                        <IdentifierSystem/>
                                        <AccountIdentifier>530-
1020000</AccountIdentifier>
                                        <QuantityNominalContract>-
6226.40</QuantityNominalContract>
                                        <PriceCurrency>EUR</PriceCurrency>
                                        <PriceType>1</PriceType>
                                
        <PriceYieldInterest>1.0</PriceYieldInterest>
                                        <Value>-6226.40</Value>
                                        <ValueCurrency>EUR</ValueCurrency>
                                        <ExchangeRate>1.0</ExchangeRate>
                                </InventoryMovement>
                                <InventoryMovement>
                                        <MovementType>002</MovementType>
                                        <CustodyAccount/>
                                        <ExternalCustodyAccount/>
                                        <CustodyLocation/>
                                        <Principal>N</Principal>
                                        <Identifier/>
                                        <IdentifierSystem/>
                                        <AccountIdentifier>530-
1020000</AccountIdentifier>
                                        <QuantityNominalContract>-
15566.00</QuantityNominalContract>
                                        <PriceCurrency>EUR</PriceCurrency>
                                        <PriceType>1</PriceType>
                                
        <PriceYieldInterest>1.0</PriceYieldInterest>
                                        <Value>-15566.00</Value>
                                        <ValueCurrency>EUR</ValueCurrency>
                                        <ExchangeRate>1.0</ExchangeRate>
                                </InventoryMovement>
                        </Movements>
                </Transaction>
                <Transaction>
                        <InventoryTransaction>
                                <EditFunction>U</EditFunction>
                                <TransactionDate>23.07.2001 
00:00</TransactionDate>
                                <TradeDate>23.07.2001 00:00</TradeDate>
                                <ValueDate>30.07.2001 00:00</ValueDate>
                                <StockExchange/>
                                <Broker>WESTLB</Broker>
                                <Counterparty>WESTLB</Counterparty>
                        
        <ExternalReference>SER521002038</ExternalReference>
                                <TransactionType>64</TransactionType>
                                <TransactionStatus>7</TransactionStatus>
                                <ReversalType>0</ReversalType>
                                <PortfolioName>530</PortfolioName>
                                <ExternalPortfolioName>SLAM-
SLM1</ExternalPortfolioName>
                                <Currency>EUR</Currency>
                                <TransactionValue>49800.00</TransactionValue>
                        </InventoryTransaction>
                        <Movements>
                                <InventoryMovement>
                                        <MovementType>64</MovementType>
                                        <CustodyAccount>Sperrdepot 
LoosingNerve</CustodyAccount>
                                        <ExternalCustodyAccount>41 99 789 
316</ExternalCustodyAccount>
                                
        <CustodyLocation>WESTLB</CustodyLocation>
                                        <Principal>Y</Principal>
                                        <Identifier>00009068490</Identifier>
                                        <IdentifierSystem>4</IdentifierSystem>
                                        <AccountIdentifier/>
                                        <QuantityNominalContract>-
1000.000</QuantityNominalContract>
                                        <PriceCurrency>EUR</PriceCurrency>
                                        <PriceType>1</PriceType>
                                
        <PriceYieldInterest>49.8</PriceYieldInterest>
                                        <Value>-49800</Value>
                                        <ValueCurrency>EUR</ValueCurrency>
                                        <ExchangeRate>1.0</ExchangeRate>
                                </InventoryMovement>
                                <InventoryMovement>
                                        <MovementType>CREDIT</MovementType>
                                        <CustodyAccount/>
                                        <ExternalCustodyAccount/>
                                        <CustodyLocation/>
                                        <Principal>N</Principal>
                                        <Identifier/>
                                        <IdentifierSystem/>
                                        <AccountIdentifier>530-
1020000</AccountIdentifier>
                                
        <QuantityNominalContract>49800</QuantityNominalContract>
                                        <PriceCurrency>EUR</PriceCurrency>
                                        <PriceType>1</PriceType>
                                
        <PriceYieldInterest>1.0</PriceYieldInterest>
                                        <Value>49800</Value>
                                        <ValueCurrency>EUR</ValueCurrency>
                                        <ExchangeRate>1.0</ExchangeRate>
                                </InventoryMovement>
                        </Movements>
                </Transaction>
        </DATA>
</Message>
END OF INPUT XML!

Reply via email to