title: strip html tag from xml using xslt
body: <p>i want to fetch normal text from xml which one field containing html data.i cant put condition on template.pls suggest me any solution.</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; 
   &lt;workdetail&gt;  
  &lt;field name="summaryText1"&gt;&amp;lt;UL style="MARGIN-TOP: 0in" type=disc&amp;gt;
  &amp;lt;LI style="TEXT-ALIGN: justify;MARGIN-BOTTOM: 0pt" class=MsoNormal&amp;gt;&amp;lt;SPAN style="mso-fareast-font-family: 'timesnewroman'; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin; mso-bidi-font-style: italic"&amp;gt;&amp;lt;FONT size=2&amp;gt;Manage the daily activities of the HOD s office.&amp;lt;?xml:namespace prefix = o /&amp;gt;&amp;lt;o:p&amp;gt;&amp;lt;/o:p&amp;gt;&amp;lt;/FONT&amp;gt;&amp;lt;/SPAN&amp;gt;&amp;lt;/LI&amp;gt;
  &amp;lt;LI style="MARGIN-BOTTOM: 0pt" class=MsoNormal&amp;gt;&amp;lt;SPAN style="mso-fareast-font-family: 'timesnewroman'; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin; mso-bidi-font-style: italic"&amp;gt;&amp;lt;FONT size=2&amp;gt;Handle and manage all communication, correspondence and filing of documents. &amp;lt;o:p&amp;gt;&amp;lt;/o:p&amp;gt;&amp;lt;/FONT&amp;gt;&amp;lt;/SPAN&amp;gt;&amp;lt;/LI&amp;gt;
  &amp;lt;LI style="MARGIN-BOTTOM: 0pt" class=MsoNormal&amp;gt;&amp;lt;SPAN style="mso-fareast-font-family: 'timesnewroman'; mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin; mso-bidi-font-style: italic"&amp;gt;&amp;lt;FONT size=2&amp;gt;Fix appointments, arrange for meetings, conferences etc.&amp;lt;o:p&amp;gt;&amp;lt;/o:p&amp;gt;&amp;lt;/FONT&amp;gt;&amp;lt;/SPAN&amp;gt;&amp;lt;/LI&amp;gt;
   &lt;/workdetail&gt;
  </code></pre>
  
  <p>mu xsl file is as </p>
  
  <pre><code>&lt;xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
  &lt;xsl:output  indent="yes" encoding="utf-8"/&gt;
  &lt;xsl:strip-space elements="*"/&gt;
  &lt;xsl:template match="/"&gt;
  &lt;workdetail&gt;
   &lt;xsl:apply-templates select="*" /&gt;
  &lt;/workdetail&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match="*:workdetail"&gt;
   &lt;xsl:variable name="text" select="*:field[starts-with(@name,'summaryText1')]"/&gt;
           &lt;xsl:choose&gt;
  
      &lt;xsl:when test="contains($text, '&amp;lt;')"&gt;
  
          &lt;xsl:value-of select="substring-after($text, '&amp;lt;')"/&gt;
  
  
  
                  &lt;xsl:variable name="text" select="substring-after($text, '&amp;gt;')"/&gt;
      &lt;/xsl:when&gt;
  
      &lt;xsl:otherwise&gt;
  
          &lt;xsl:value-of select="$text"/&gt;
  
      &lt;/xsl:otherwise&gt;
  
  &lt;/xsl:choose&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>this is returning everything after &gt; tag. can i pass more value in this which will return only text document.</p>