[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Match content within Two Files

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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.