My xml document has 2 addresses.
One under
and another one under
Code:
I only want to display the Address which is under
but if that there is no Address there, then I want to display the Address under
How do I do this?
My xml document
My xsl is displaying the address under Party. This is not the address I want. I want the address under CaseParty
One under
XML:
/Integration/Case/CaseParty/Address
Code:
XML:
/Integration/Party/Address[@PartyCurrent='true']
XML:
/Integration/Party/Address[@PartyCurrent='true']
XML:
/Integration/Party/Address[@PartyCurrent='true']
My xml document
XML:
<Integration xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="[URL unfurl="true"]http://tsgweb.com"[/URL] xmlns:IXML="[URL unfurl="true"]http://tsgweb.com"[/URL] xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" PackageID="DL Notice to DVS" MessageID="67084533" xmlns="">
<Case Op="E" InternalID="1617088326" ID="12120229" xmlns:user="[URL unfurl="true"]http://tylertechnologies.com">[/URL]
<CaseParty ID="16731290" InternalCasePartyID="1634787102" InternalPartyID="1614631672">
<Connection Word="DFD" BaseConnection="DF" ID="36370323" InternalCasePartyConnectionID="1636469444">
<Description>Defendant</Description>
</Connection>
<Address CaseCorrespondence="true" ID="17875824" Type="Standard">
<AddressLine2>3712 Testing RD</AddressLine2>
<AddressLine4>St Paul, NY, 21457</AddressLine4>
<Block>3712</Block>
<Street>Testing</Street>
<AddrSfxKy Word="RD">Road</AddrSfxKy>
<City>St Paul</City>
<State>NY</State>
<Zip>21457</Zip>
<Foreign>false</Foreign>
<TimestampCreate>5/27/2015 10:34:08 AM</TimestampCreate>
</Address>
<TimestampCreate>1/29/2015 5:04:53 PM</TimestampCreate>
<TimestampChange/>
</CaseParty>
</Case>
<Party ID="16731290" InternalPartyID="1614631672">
<Address PartyCorrespondence="true" PartyCurrent="true" ID="17867956" Type="Standard">
<AddressLine2>1906 3RD AVE S #36</AddressLine2>
<AddressLine4>Denver, CO, 55408</AddressLine4>
<Block>1906</Block>
<Street>3RD AVE S #36</Street>
<City>Denver</City>
<State>CO</State>
<Zip>87459</Zip>
<Foreign>false</Foreign>
</Address>
</Party>
</Integration>
My xsl is displaying the address under Party. This is not the address I want. I want the address under CaseParty
Code:
<xsl:for-each select="/Integration/Party[@ID=current()/@ID]/Address[@PartyCurrent='true']">