[xsl] Match content within Two Files

Subject: [xsl] Match content within Two Files
From: "Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 19 Aug 2024 19:12:18 -0000
Hi,

I have two files. Take the TITLE value from File 1 and match the content in
file 2, then placing the tag as per file 1 including <XREFID>, and
<LEGNAME>. Find the below


File -1

<data>
<row>
<PARENTELEMENT>para0</PARENTELEMENT>
<TITLE>s 588FGA</TITLE>
<PARENTID>220-5</PARENTID>
<XREFID>CTH_ACT_2001-50_SEC588FGA</XREFID>
<FLAG>False</FLAG>
<CONTENTSTREAM>legislation</CONTENTSTREAM>
<SOURCECONTENTSTREAM>hla-au</SOURCECONTENTSTREAM>
<JURIS>CTH</JURIS>
<LEGNAME>STS Act</LEGNAME>
</row>
<row>
<PARENTELEMENT>para0</PARENTELEMENT>
<TITLE>s 22A(1)</TITLE>
<PARENTID>220-5</PARENTID>
<XREFID>NSW_ACT_1987-33_SEC22ASUB1</XREFID>
<FLAG>False</FLAG>
<CONTENTSTREAM>legislation</CONTENTSTREAM>
<SOURCECONTENTSTREAM>hla-au</SOURCECONTENTSTREAM>
<JURIS>NSW</JURIS>
<LEGNAME>Public Authorities</LEGNAME>
</row>

File - 2

<md>
<chapter>
<num>1</num>
<paras id="HLA_220_1_A">
<para0 curr="26-03-2018" id="220-1">
<num>[220-1]</num>
<title>Obligations</title>
 <text>If, however, the payment s 22A(1) made without</text>
</para0>
<para0 curr="26-03-2018" id="220-5">
<num>[220-5]</num>
<p><text>If, however, the payment s 588FGA made without</text></p>
<footnote>
<num>1</num>
<p><text>See, for example, Corporations Act 2001 s 588FGA.</text></p>
</footnote>
</para0>
</paras>
</chapter>
</md>

Output Should be

<md>
<chapter>
<num>1</num>
<paras id="HLA_220_1_A">
<para0 curr="26-03-2018" id="220-1">
<num>[220-1]</num>
<p><text>the payment <strf jd="CTH" id="CTH_ACT_1975-91">
<strfact>Public Authorities</strfact>
<sec id="NSW_ACT_1987-33_SEC22ASUB1">s 22A(1)</sec>
</strf> made without</text></p>
</para0>
<para0 curr="26-03-2018" id="220-5">
<num>[220-5]</num>
<p><text>Test time</text></p>
<footnote>
<num>1</num>
<p><text>See, for example, Corporations Act 2001 <strf jd="CTH"
id="CTH_ACT_1975-91">
<strfact>STS Act</strfact>
<sec id="CTH_ACT_2001-50_SEC588FGA">s 588FGA</sec>
</strf>
.</text></p>
</footnote>
</para0>
</paras>
</chapter>
</md>

Please help.

thanks
Sahoo

Current Thread