Topic
  • No replies
SystemAdmin
SystemAdmin
76 Posts

Pinned topic joins within an xml; references

‏2008-09-02T07:47:40Z |
Consider the xml:
'<FpML>
<trade>
<tradeHeader>
<partyTradeIdentifier>
<partyReference href="party1"/>
<tradeId tradeIdScheme="http://www.MyGlobal.com/trade-id">MyGlobal123</tradeId>
</partyTradeIdentifier>
<partyTradeIdentifier>
<partyReference href="party2"/>
<tradeId tradeIdScheme="http://www.NationalV.com/trade-id">123</tradeId>
</partyTradeIdentifier>
<tradeDate>2001-04-29Z</tradeDate>
</tradeHeader>
<termDeposit>
<productType>Overnight Term Deposit</productType>
<initialPayerReference href="party1"/>
<initialReceiverReference href="party2"/>
<startDate>2002-02-14Z</startDate>
<maturityDate>2002-02-21Z</maturityDate>
<dayCountFraction>ACT/360</dayCountFraction>
<principal>
<currency>EUR</currency>
<amount>25000000.00</amount>
</principal>
<fixedRate>0.04</fixedRate>
</termDeposit>
</trade>
<party id="party1">
<partyId>510026</partyId>
</party>
<party id="party2">
<partyId>67781</partyId>
</party>
</FpML>');

How can I query (using XQuery and/or SQL/XML) to obtain partyId of the initialPayer?

Also, how would the xsd of this xml look like (specifically interested about the references party1 and party2)?

I've also attached the xml file.

Thanks!

Attachments