I have the below xml and from this I have to retrieve the value of ccptrade id in this cml there are total 4 ccptrade id that are 89180, 89130,89160,89120. Below the xml input is shown:
<?xml version="1.0" encoding="UTF-8"?>
<Report xmlns="http://ift.tt/1CmFNq1" name="CD200 Cash Forecast Report">
<rptHdr>
<exchNam>ECAG</exchNam>
<rptCod>RPTCD200</rptCod>
<rptNam>Cash Forecast Report</rptNam>
<membLglNam>Test Bank</membLglNam>
<membId>ABCD</membId>
<rptPrntEffDat>2014-01-16</rptPrntEffDat>
<rptPrntRunDat>2014-01-16</rptPrntRunDat>
</rptHdr>
<reportNameGrp>
<CM>
<acctTypGrp name="P">
<currTypCod value="EUR">
<cashFlowDate value="2014-01-16">
<trnTyp type="OTC COUPON PAID">
<CCPTrade Id="89180">
<idxName>EURIBOR</idxName>
<idxTenor>3M</idxTenor>
<idxSource>EURIBOR01</idxSource>
<srcSysTradeId>12517478</srcSysTradeId>
<srcSysGroupId>12517478</srcSysGroupId>
<srcSysLEId>ET11111</srcSysLEId>
<tradeRefId>12517478-2</tradeRefId>
<oldTradeRefId>12517478-2</oldTradeRefId>
<effectiveDate>2013-10-16</effectiveDate>
<maturityDate>2015-10-16</maturityDate>
<CFNPV>-6382.07</CFNPV>
<setlAmnt>-6382.07</setlAmnt>
<settlement>PaymentInstructed</settlement>
<setlLoc>TARGET2</setlLoc>
<srcSysId>MarkitWire</srcSysId>
<UTI>O00000000000000000001C</UTI>
<priorUSI>O000000000000123456789</priorUSI>
<USI>
</USI>
</CCPTrade>
<subtotal value="-6382.07">
</subtotal>
</trnTyp>
<trnTyp type="OTC COUPON RECEIVED">
<CCPTrade Id="89130">
<idxName>EURIBOR</idxName>
<idxTenor>3M</idxTenor>
<idxSource>EURIBOR01</idxSource>
<srcSysTradeId>12517478</srcSysTradeId>
<srcSysGroupId>12517478</srcSysGroupId>
<srcSysLEId>ET11111</srcSysLEId>
<tradeRefId>12517478-2</tradeRefId>
<oldTradeRefId>12517478-2</oldTradeRefId>
<effectiveDate>2013-10-16</effectiveDate>
<maturityDate>2015-10-16</maturityDate>
<CFNPV>6381.50</CFNPV>
<setlAmnt>6381.50</setlAmnt>
<settlement>PaymentInstructed</settlement>
<setlLoc>TARGET2</setlLoc>
<srcSysId>MarkitWire</srcSysId>
<UTI>O00000000000000000001C</UTI>
<priorUSI>O000000000000123456789</priorUSI>
<USI>
</USI>
</CCPTrade>
<subtotal value="6381.50">
</subtotal>
</trnTyp>
</cashFlowDate>
<cashFlowDate value="2014-01-20">
<trnTyp type="OTC FEE PAYMENT PAID">
<CCPTrade Id="89160">
<idxName>
</idxName>
<idxTenor>
</idxTenor>
<idxSource>
</idxSource>
<srcSysTradeId>12517478</srcSysTradeId>
<srcSysGroupId>12517478</srcSysGroupId>
<srcSysLEId>ET11111</srcSysLEId>
<tradeRefId>12517478-2</tradeRefId>
<oldTradeRefId>12517478-2</oldTradeRefId>
<effectiveDate>2013-10-16</effectiveDate>
<maturityDate>2015-10-16</maturityDate>
<CFNPV>Not Available</CFNPV>
<setlAmnt>-1000.00</setlAmnt>
<settlement>NotSettled</settlement>
<setlLoc>TARGET2</setlLoc>
<srcSysId>MarkitWire</srcSysId>
<UTI>O00000000000000000001C</UTI>
<priorUSI>O000000000000123456789</priorUSI>
<USI>
</USI>
</CCPTrade>
<CCPTrade Id="89120">
<idxName>
</idxName>
<idxTenor>
</idxTenor>
<idxSource>
</idxSource>
<srcSysTradeId>12517478</srcSysTradeId>
<srcSysGroupId>12517478</srcSysGroupId>
<srcSysLEId>ET11111</srcSysLEId>
<tradeRefId>12517478-2</tradeRefId>
<oldTradeRefId>12517478-2</oldTradeRefId>
<effectiveDate>2013-10-16</effectiveDate>
<maturityDate>2015-10-16</maturityDate>
<CFNPV>Not Available</CFNPV>
<setlAmnt>-1500.00</setlAmnt>
<settlement>NotSettled</settlement>
<setlLoc>TARGET2</setlLoc>
<srcSysId>MarkitWire</srcSysId>
<UTI>O00000000000000000001C</UTI>
<priorUSI>O000000000000123456789</priorUSI>
<USI>
</USI>
</CCPTrade>
<subtotal value="-2500.00">
</subtotal>
</trnTyp>
</cashFlowDate>
</currTypCod>
</acctTypGrp>
</CM>
</reportNameGrp>
</Report>
I have written the below xslt to retrieve the value of ccptrade id independently but still after doing transformation the value is not coming please advise what went wrong in the xslt..
<xsl:stylesheet version="1.0"
xmlns:xsl="http://ift.tt/tCZ8VR"
xmlns:eurr="http://ift.tt/1Atm7RX">
xmlns:fpml="http://ift.tt/1gVfJXZ" xmlns:xsl="http://ift.tt/tCZ8VR"
<xsl:output method="xml" version="1.0" encoding="UTF-8"
indent="yes" omit-xml-declaration="yes" />
<!-- Main template starts -->
<xsl:template match="/eurr:Report">
<eurrexMessage>
<eurrexFlows>
<xsl:apply-templates
select="eurr:reportNameGrp/eurr:CM/eurr:acctTypGrp/eurr:ProductType/eurr:currTypCod/eurr:cashFlowDate/eurr:trnTyp" />
</eurrexFlows>
</eurrexMessage>
</xsl:template>
<!-- sub template starts -->
<xsl:template match="eurr:trnTyp">
<eurrexcashMessageObject>
<CCPTradeId>
<xsl:value-of select="/eurr:CCPTradeId/@id" />
</CCPTradeId>
</eurrexcashMessageObject>
</xsl:template>
</xsl:stylesheet>
folks please advise for this Thanks in advance also lease advise i believe is it the name space issue can also be there
No comments:
Post a Comment