add a tag by reading a tag in xml with xsl

i have the below xml

<Summary>
    <Category type="CA">
    <Description>You no longer qualify for CA</Description>
    </Category>
    <Category type="FF">
      <Description>You no longer qualify for FF</Description>
    </Category>
    <Category type="MM">
     <Description>You no longer qualify </Description>
    </Category>
    <Category type="CC">
   <Description>Based on information you provided </Description>
    </Category>
  </Summary>

i am trying to get it in the below format, for every <Description> under <Summary>


<Summary>
    <Category type="CA">
    <Description><body xmlns ="htp://www.xfa.org/schema/xfa-data/1.0/">You no longer qualify for CA</body></Description>
    </Category>
    <Category type="FF">
      <Description><body xmlns ="htp://www.xfa.org/schema/xfa-data/1.0/">You no longer qualify for FF</body></Description>
    </Category>
    <Category type="MM">
     <Description><body xmlns ="htp://www.xfa.org/schema/xfa-data/1.0/">You no longer qualify </body></Description>
    </Category>
    <Category type="CC">
   <Description><body xmlns ="htp://www.xfa.org/schema/xfa-data/1.0/">Based on information you provided </body></Description>
    </Category>
  </Summary>

thanks in advance.
sri1209Asked:
Who is Participating?
 
Geert BormansInformation ArchitectCommented:
Assuming you have a working XSLT from earlier questions,
add a template for Description

<xsl:template match="Description">
  <xsl:copy>
    <body xmlns ="htp://www.xfa.org/schema/xfa-data/1.0/">
      <xsl:apply-templates select="node()"/>
    </body>
  </xsl:copy>
</xsl:template>
0
 
sri1209Author Commented:
Thank you very much.
0
 
Geert BormansInformation ArchitectCommented:
welcome
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.