Note that there are some explanatory texts on larger screens.

plurals
  1. POneed to transform an xml file into another xml using xslt whose xsl file uses a Properties.xml file
    text
    copied!<p>Consider my input xml file as below</p> <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;com xsi:schemaLocation="http://do.way.com/sales/Amb http://do.way.com/temp/sales/ale/ax.xsd" xmlns:w="http://do.way.com/sales/W" xmlns="http://do.way.com/sales/Amb" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wire="http://do.way.com/sales/Wire"&gt; &lt;content&gt; &lt;wire:wire&gt; &lt;wire:sI&gt; &lt;w:aH&gt; &lt;text&gt;Ccc &lt;dynamic name="C_R_N"/&gt;: More&lt;/text&gt; &lt;w:contact value="false"/&gt; &lt;/w:aH&gt; &lt;w:page&gt; &lt;nL&gt;Please call us&lt;/nL&gt; &lt;/w:page&gt; &lt;w:body&gt; &lt;text&gt; C R N: &lt;strong&gt; &lt;dynamic name="C_R_N"/&gt;&lt;/strong&gt; &lt;/text&gt; &lt;/w:body&gt; &lt;w:body&gt; &lt;text&gt; RE: &lt;dynamic name="D_C_P"/&gt; &lt;dynamic name="M_C_O"/&gt; &lt;/text&gt; &lt;/w:body&gt; &lt;w:body&gt; &lt;text&gt; In order &lt;strong&gt; &lt;dynamic name="M_D_D"/&gt; &lt;/strong&gt;, we need some information. &lt;/text&gt; &lt;/w:body&gt; &lt;w:body&gt; &lt;text&gt; &lt;strong&gt; Please call us &lt;dynamic name="C_P_D_N"/&gt;. &lt;/strong&gt; Our hours &lt;ul class="nested"&gt; &lt;li&gt; Monday - Friday, &lt;dynamic name="DST_M_F_S_Hour"/&gt; am - &lt;dynamic name="DST_M_F_E_Hour"/&gt; pm; Saturday, &lt;dynamic name="DST_M_F_S_Hour"/&gt; am - &lt;dynamic name="DST_M_F_E_Hour"/&gt; pm. &lt;/li&gt; &lt;/ul&gt; &lt;/text&gt; &lt;/w:body&gt; &lt;w:body&gt; &lt;text&gt; Thank you for your action. . &lt;/text&gt; &lt;/w:body&gt; &lt;w:body&gt; &lt;text&gt; &lt;dynamic name="C_D_N"/&gt; &lt;/text&gt; &lt;/w:body&gt; &lt;w:TextAndImage&gt; &lt;text&gt; &lt;dynamic name="C_S_N_D"/&gt; &lt;/text&gt; &lt;/w:TextAndImage&gt; &lt;w:dynamicNames&gt; &lt;w:dynamicName value="LOW"/&gt; &lt;w:dynamicName value="Env"/&gt; &lt;/w:dynamicNames&gt; &lt;/wire:sI&gt; &lt;/wire:wire&gt; &lt;/content&gt; &lt;/com&gt; </code></pre> <p>the required xsl file which transforms the above input xml file refers to a Properties.xml file which has the respective transformed tags(values) for the input xml tag elements(keys) given below Properties.xml </p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Properties&gt; &lt;Property value="w:aH"&gt;aHe&lt;/Property&gt; &lt;Property value="w:contact"&gt;contact1&lt;/Property&gt; &lt;Property value="w:page"&gt;pageH&lt;/Property&gt; &lt;Property value="w:body"&gt;bodyP&lt;/Property&gt; &lt;Property value="w:TextAndImage"&gt;textAndImage1&lt;/Property&gt; &lt;Property value="w:dynamicNames"&gt;dynamicNames1&lt;/Property&gt; &lt;Property value="w:dynamicName"&gt;dynamicValName&lt;/Property&gt; &lt;/Properties&gt; </code></pre> <p>and my transformed xml looks like </p> <pre><code> &lt;Content xsi:schemaLocation="id:d1234 http://abc:10/w/g/B/System/abc.xsd" xmlns="id:d1234" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;aHe&gt; &lt;text&gt;Ccc &lt;dynamic name="C_R_N" xmlns="http://www.w3.org/1999/xhtml" &gt; C_R_N &lt;/dynamic&gt; : More &lt;/text&gt; &lt;contact1&gt;false&lt;/contact1&gt; &lt;/aHe&gt; &lt;pageH&gt; &lt;nL&gt;Please call us&lt;/nL&gt; &lt;/pageH&gt; &lt;bodyP&gt; &lt;text&gt; C R N: &lt;strong&gt; &lt;dynamic name="C_R_N" xmlns="http://www.w3.org/1999/xhtml"&gt; C_R_N &lt;/dynamic&gt; &lt;/strong&gt; &lt;/text&gt; &lt;/bodyP&gt; &lt;bodyP&gt; &lt;text&gt; RE: &lt;dynamic name="D_C_P" xmlns="http://www.w3.org/1999/xhtml"&gt; D_C_P&lt;/dynamic&gt; &lt;dynamic name="M_C_O" xmlns="http://www.w3.org/1999/xhtml"&gt;M_C_O&lt;/dynamic&gt; &lt;/text&gt; &lt;/bodyP&gt; &lt;bodyP&gt; &lt;text&gt; In order &lt;strong&gt; &lt;dynamic name="M_D_D" xmlns="http://www.w3.org/1999/xhtml"&gt; M_D_D &lt;/dynamic&gt; &lt;/strong&gt;, we need some information. &lt;/text&gt; &lt;/bodyP&gt; &lt;bodyP&gt; &lt;text&gt; Please call us &lt;strong&gt; &lt;dynamic name="C_P_D_N" xmlns="http://www.w3.org/1999/xhtml"&gt;C_P_D_N&lt;/dynamic&gt;. &lt;/strong&gt; Our hours &lt;ul class="nested"&gt; &lt;li&gt; Monday - Friday, &lt;dynamic name="DST_M_F_S_Hour" xmlns="http://www.w3.org/1999/xhtml"&gt;DST_M_F_S_Hour&lt;/dynamic&gt; am - &lt;dynamic name="DST_M_F_E_Hour" xmlns="http://www.w3.org/1999/xhtml"&gt;DST_M_F_E_Hour&lt;/dynamic&gt; pm; Saturday, &lt;dynamic name="DST_M_F_S_Hour" xmlns="http://www.w3.org/1999/xhtml"&gt;DST_M_F_S_Hour&lt;/dynamic&gt; am - &lt;dynamic name="DST_M_F_E_Hour" xmlns="http://www.w3.org/1999/xhtml"&gt; DST_M_F_E_Hour&lt;/dynamic&gt;pm. &lt;/li&gt; &lt;/ul&gt; &lt;/text&gt; &lt;/bodyP&gt; &lt;bodyP&gt; &lt;text&gt; Thank you for your action. . &lt;/text&gt; &lt;/bodyP&gt; &lt;bodyP&gt; &lt;text&gt; &lt;dynamic name="C_D_N" xmlns="http://www.w3.org/1999/xhtml"&gt; C_D_N &lt;/dynamic&gt; &lt;/text&gt; &lt;/bodyP&gt; &lt;textAndImage&gt; &lt;text&gt; &lt;dynamic name="C_S_N_D" xmlns="http://www.w3.org/1999/xhtml"&gt; C_S_N_D &lt;/dynamic&gt; &lt;/text&gt; &lt;/textAndImage&gt; &lt;dynamicNames1&gt; &lt;dynamicValName&gt;LOW&lt;/dynamicValName&gt; &lt;dynamicValName&gt;Env&lt;/dynamicValName&gt; &lt;/dynamicNames1&gt; &lt;/Content&gt; Can anyone provide me with the xsl file which meets my requirement. </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload