Note that there are some explanatory texts on larger screens.

plurals
  1. POCreate XSLT from an XML to get desired XML
    primarykey
    data
    text
    <p>I have a situation here : Consider the following code as example :</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;school id="1" alias="abc" name="St.Josephs" val=""&gt; &lt;teacher id="1"&gt;Rose&lt;/teacher&gt; &lt;subject&gt;maths&lt;/subject&gt; &lt;/school&gt; &lt;school id="2" alias="bcd" name="" val=""&gt; &lt;teacher id="2"&gt;john&lt;/teacher&gt; &lt;subject&gt;science&lt;/subject&gt; &lt;/school&gt; &lt;school id="3" alias="abc" name="" val=""&gt; &lt;student rollno="12"&gt;sarah&lt;/student&gt; &lt;age&gt;13&lt;/age&gt; &lt;/school&gt; &lt;school id="4" alias="bcd" name="St.Mary's" val=""&gt; &lt;student rollno="14"&gt;Rosh&lt;/student&gt; &lt;age&gt;14&lt;/age&gt; &lt;/school&gt; </code></pre> <p>Now here I need to design an XSLT which will create elements having data from element where alias is abc, bcd simultaenously whose output will be something like this :</p> <pre><code>&lt;Institutes&gt; &lt;group&gt; &lt;content&gt; &lt;![CDATA[ &lt;html&gt; &lt;head&gt; &lt;title&gt;'Rose' is a 'Maths' teacher&lt;/title&gt; &lt;/head&gt; &lt;body&gt; Rose is a maths teacher for sarah in St.josephs school &lt;/body&gt; &lt;/html&gt; ]]&gt; &lt;/content&gt; &lt;/group&gt; &lt;/Institutes&gt; &lt;Institutes&gt; &lt;group&gt; &lt;content&gt; &lt;![CDATA[ &lt;html&gt; &lt;head&gt; &lt;title&gt;'john' is a 'science' teacher&lt;/title&gt; &lt;/head&gt; &lt;body&gt; john is a science teacher for Rosh in St.Mary's school &lt;/body&gt; &lt;/html&gt; ]]&gt; &lt;/content&gt; &lt;/group&gt; &lt;/Institutes&gt; Is there any way to achieve this..?? </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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