XSLT nested menu transform based on featured attri

2019-08-14 01:44发布

问题:

I am writing an application that will modify existing menu output. I have a number of ways I can think of to do this, one of them I think is XSLT but I am a complete beginner in such transforms.

I am looking to change the following:

<ul>
  <li><a href="#">Item1</a>
    <ul>
      <li class="featured"><a href="#">Item 1.1</a></li>
      <li><a href="#">Item 1.2</a></li>
      <li class="featured"><a href="">Item 1.3</a></li>
      <li><a href="#">Item 1.4</a></li>
    </ul>
  </li>
</ul>

To the new:

<ul>
  <li><a href="#">Item1</a>
    <ul>
      <li>
        <ul>
          <li><a href="#">Item 1.1</a></li>
          <li><a href="#">Item 1.2</a></li>
          <li><a href="#">Item 1.3</a></li>
          <li><a href="#">Item 1.4</a></li>
        </ul>
      </li>
      <li>
        <ul class="featured">
           <li><a href="#">Item 1.1</a></li>
           <li><a href="#">Item 1.3</a></li>
        </ul>
      </li>
    </ul>
  </li>
</ul>

I have the following questions:

What transform would I need for the above?

How would I constrain to only n-levels deep (in this case we would not want children of the ul.ul.ul.li items, i.e. Item x.x, to be included)?

What if I wanted to only apply this transform to a style where the top <ul> has an attribute class="style1", and if it is set to "style2" a different transform is applied?

回答1:

I'm not 100% sure why you are adding an extra level of ul and I'm not sure about the "n-levels" deep requirement (a better example would help), but this should get you started:

XSLT 1.0

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output indent="yes"/>
    <xsl:strip-space elements="*"/>

    <xsl:template match="@*|node()">
        <xsl:copy>
            <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
    </xsl:template>

    <xsl:template match="ul[@class='style1']/li">
        <xsl:copy>
            <xsl:apply-templates select="@*|*[not(self::ul)]"/>
            <ul>
                <li>
                    <xsl:apply-templates select="ul"/>
                </li>
                <li>
                    <ul class="featured">
                        <xsl:apply-templates select="ul/li[@class='featured']"/>
                    </ul>
                </li>
            </ul>
        </xsl:copy>
    </xsl:template>

    <xsl:template match="li">
        <xsl:copy>
            <xsl:apply-templates/>
        </xsl:copy>
    </xsl:template>

</xsl:stylesheet>

Output

<ul class="style1">
   <li>
      <a href="#">Item1</a>
      <ul>
         <li>
            <ul>
               <li>
                  <a href="#">Item 1.1</a>
               </li>
               <li>
                  <a href="#">Item 1.2</a>
               </li>
               <li>
                  <a href="">Item 1.3</a>
               </li>
               <li>
                  <a href="#">Item 1.4</a>
               </li>
            </ul>
         </li>
         <li>
            <ul class="featured">
               <li>
                  <a href="#">Item 1.1</a>
               </li>
               <li>
                  <a href="">Item 1.3</a>
               </li>
            </ul>
         </li>
      </ul>
   </li>
</ul>


回答2:

You can try this XSLT

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:php="http://php.net/xsl"  exclude-result-prefixes="php" version="1.0">
  <xsl:output method="html" version="1.0" encoding="utf-8" indent="yes"  omit-xml-declaration="no"/>

  <xsl:template match="/">
    <div id="menu">
      <ul id="mega">
        <xsl:for-each select="//Menu/MainMenu">
          <xsl:choose>
            <xsl:when  test="@isdisplay=1 and @iscategory=1">
              <xsl:element name="li">
                <xsl:attribute name="style">
                  border-left:#ffffff 1px solid;
                </xsl:attribute>
                <xsl:attribute name="class">
                  <xsl:value-of select="@class"/>
                </xsl:attribute>
                <xsl:variable name="name">
                  <xsl:value-of select="@name"/>
                </xsl:variable>
                <xsl:element name="a">
                  <xsl:attribute name="href">
                    <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php',$name,'','','')"/>
                  </xsl:attribute>
                  <xsl:value-of select="@displayname"/>
                </xsl:element>
                <xsl:if test="count(SubMenu) > 0">
                  <xsl:choose>
                    <xsl:when test="@name='Outdoor Gear'">
                      <div>
                        <xsl:apply-templates select="//Menu/MainMenu[@name='Outdoor Gear']">
                        </xsl:apply-templates>
                      </div>
                    </xsl:when>
                    <xsl:when test="@name='Clothing / Footwear'">
                      <div style="width:490px !important;">
                        <xsl:apply-templates select="//Menu/MainMenu[@name='Clothing / Footwear']"></xsl:apply-templates>
                      </div>
                    </xsl:when>
                    <xsl:when test="@name='Electronics'">
                      <div style="width:200px !important;">
                        <xsl:apply-templates select="//Menu/MainMenu[@name='Electronics']"></xsl:apply-templates>
                      </div>
                    </xsl:when>
                    <xsl:when test="@name='Gifts'">
                      <div style="width:200px !important;">
                        <xsl:apply-templates select="//Menu/MainMenu[@name='Gifts']"></xsl:apply-templates>
                      </div>
                    </xsl:when>
                    <xsl:when test="@name='Petzl'">
                      <div style="width:200px !important;">
                        <xsl:apply-templates select="//Menu/MainMenu[@name='Petzl']"></xsl:apply-templates>
                      </div>
                    </xsl:when>
                  </xsl:choose>
                </xsl:if>
              </xsl:element>
            </xsl:when>
            <xsl:when  test="@isdisplay=1 and @iscategory=0">
              <xsl:element name="li">
                <xsl:attribute name="style">
                  border-left:#ffffff 1px solid;
                </xsl:attribute>
                <xsl:attribute name="class">
                  <xsl:value-of select="@class"/>
                </xsl:attribute>
                <xsl:variable name="name">
                  <xsl:value-of select="@name"/>
                </xsl:variable>
                <xsl:element name="a">
                  <xsl:attribute name="href">
                    <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','',$name,'','','')"/>
                  </xsl:attribute>
                  <xsl:value-of select="@displayname"/>
                </xsl:element>
              </xsl:element>
            </xsl:when>
          </xsl:choose>
        </xsl:for-each>
      </ul>
    </div>
  </xsl:template>

  <xsl:template match="//Menu/MainMenu[@name='Outdoor Gear']">
    <span class="main">
      <h2>
        <xsl:variable name="name">
          <xsl:value-of select="SubMenu[@name='Water Sport']/@name"/>
        </xsl:variable>
        <xsl:element name="a">
          <xsl:attribute name="href">
            <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,'','')"/>
          </xsl:attribute>
          <xsl:value-of select="SubMenu[@name='Water Sport']/@displayname" disable-output-escaping="yes"/>
        </xsl:element>
      </h2>
      <xsl:for-each select="SubMenu[@name='Water Sport']/SubSubMenu">
        <xsl:if test="@isdisplay=1">
          <span class="inner">
            <xsl:variable name="name">
              <xsl:value-of select="//Menu/MainMenu[@name='Outdoor Gear']/SubMenu[@name='Water Sport']/@name"/>
            </xsl:variable>
            <xsl:variable name="name1">
              <xsl:value-of select="@name"/>
            </xsl:variable>
            <xsl:element name="a">
              <xsl:attribute name="href">
                <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,'')"/>
              </xsl:attribute>
              <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
            </xsl:element>
          </span>
        </xsl:if>
        <xsl:for-each select="ChildMenu">
          <xsl:if test="@isdisplay=1">
            <span class="inner">
              <xsl:variable name="name">
                <xsl:value-of select="../../@name"/>
              </xsl:variable>
              <xsl:variable name="name1">
                <xsl:value-of select="../@name"/>
              </xsl:variable>
              <xsl:variable name="name2">
                <xsl:value-of select="@name"/>
              </xsl:variable>
              <xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,$name2)"/>
                </xsl:attribute>
                <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
              </xsl:element>
            </span>
          </xsl:if>
        </xsl:for-each>
      </xsl:for-each>

      <br clear="all"  />
      <h2>
        <xsl:variable name="name">
          <xsl:value-of select="SubMenu[@name='Archery']/@name"/>
        </xsl:variable>
        <xsl:element name="a">
          <xsl:attribute name="href">
            <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,'','')"/>
          </xsl:attribute>
          <xsl:value-of select="SubMenu[@name='Archery']/@displayname" disable-output-escaping="yes"/>
        </xsl:element>
      </h2>
      <xsl:for-each select="SubMenu[@name='Archery']/SubSubMenu">
        <xsl:if test="@isdisplay=1">
          <span class="inner">
            <xsl:variable name="name">
              <xsl:value-of select="//Menu/MainMenu[@name='Outdoor Gear']/SubMenu[@name='Archery']/@name"/>
            </xsl:variable>
            <xsl:variable name="name1">
              <xsl:value-of select="@name"/>
            </xsl:variable>
            <xsl:element name="a">
              <xsl:attribute name="href">
                <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,'')"/>
              </xsl:attribute>
              <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
            </xsl:element>
          </span>
        </xsl:if>
        <xsl:for-each select="ChildMenu">
          <xsl:if test="@isdisplay=1">
            <span class="inner">
              <xsl:variable name="name">
                <xsl:value-of select="../../@name"/>
              </xsl:variable>
              <xsl:variable name="name1">
                <xsl:value-of select="../@name"/>
              </xsl:variable>
              <xsl:variable name="name2">
                <xsl:value-of select="@name"/>
              </xsl:variable>
              <xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,$name2)"/>
                </xsl:attribute>
                <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
              </xsl:element>
            </span>
          </xsl:if>
        </xsl:for-each>
      </xsl:for-each>

      <h2>
        <xsl:variable name="name">
          <xsl:value-of select="SubMenu[@name='Climbing']/@name"/>
        </xsl:variable>
        <xsl:element name="a">
          <xsl:attribute name="href">
            <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,'','')"/>
          </xsl:attribute>
          <xsl:value-of select="SubMenu[@name='Climbing']/@displayname" disable-output-escaping="yes"/>
        </xsl:element>
      </h2>
      <xsl:for-each select="SubMenu[@name='Climbing']/SubSubMenu">
        <xsl:if test="@isdisplay=1">
          <span class="inner">
            <xsl:variable name="name">
              <xsl:value-of select="//Menu/MainMenu[@name='Outdoor Gear']/SubMenu[@name='Climbing']/@name"/>
            </xsl:variable>
            <xsl:variable name="name1">
              <xsl:value-of select="@name"/>
            </xsl:variable>
            <xsl:element name="a">
              <xsl:attribute name="href">
                <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,'')"/>
              </xsl:attribute>
              <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
            </xsl:element>
          </span>
        </xsl:if>
        <xsl:for-each select="ChildMenu">
          <xsl:if test="@isdisplay=1">
            <span class="inner">
              <xsl:variable name="name">
                <xsl:value-of select="../../@name"/>
              </xsl:variable>
              <xsl:variable name="name1">
                <xsl:value-of select="../@name"/>
              </xsl:variable>
              <xsl:variable name="name2">
                <xsl:value-of select="@name"/>
              </xsl:variable>
              <xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,$name2)"/>
                </xsl:attribute>
                <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
              </xsl:element>
            </span>
          </xsl:if>
        </xsl:for-each>
      </xsl:for-each>

      <br clear="all"  />
      <h2>
        <xsl:variable name="name">
          <xsl:value-of select="SubMenu[@name='Fishing']/@name"/>
        </xsl:variable>
        <xsl:element name="a">
          <xsl:attribute name="href">
            <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,'','')"/>
          </xsl:attribute>
          <xsl:value-of select="SubMenu[@name='Fishing']/@displayname" disable-output-escaping="yes"/>
        </xsl:element>
      </h2>
      <xsl:for-each select="SubMenu[@name='Fishing']/SubSubMenu">
        <xsl:if test="@isdisplay=1">
          <span class="inner">
            <xsl:variable name="name">
              <xsl:value-of select="//Menu/MainMenu[@name='Outdoor Gear']/SubMenu[@name='Fishing']/@name"/>
            </xsl:variable>
            <xsl:variable name="name1">
              <xsl:value-of select="@name"/>
            </xsl:variable>
            <xsl:element name="a">
              <xsl:attribute name="href">
                <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,'')"/>
              </xsl:attribute>
              <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
            </xsl:element>
          </span>
        </xsl:if>
        <xsl:for-each select="ChildMenu">
          <xsl:if test="@isdisplay=1">
            <span class="inner">
              <xsl:variable name="name">
                <xsl:value-of select="../../@name"/>
              </xsl:variable>
              <xsl:variable name="name1">
                <xsl:value-of select="../@name"/>
              </xsl:variable>
              <xsl:variable name="name2">
                <xsl:value-of select="@name"/>
              </xsl:variable>
              <xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,$name2)"/>
                </xsl:attribute>
                <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
              </xsl:element>
            </span>
          </xsl:if>
        </xsl:for-each>
      </xsl:for-each>
    </span>

    <span class="main">
      <h2>
        <xsl:variable name="name">
          <xsl:value-of select="SubMenu[@name='Track / Field / Court / Indoors']/@name"/>
        </xsl:variable>
        <xsl:element name="a">
          <xsl:attribute name="href">
            <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,'','')"/>
          </xsl:attribute>
          <xsl:value-of select="SubMenu[@name='Track / Field / Court / Indoors']/@displayname" disable-output-escaping="yes"/>
        </xsl:element>
      </h2>
      <xsl:for-each select="SubMenu[@name='Track / Field / Court / Indoors']/SubSubMenu">
        <xsl:if test="@isdisplay=1">
          <span class="inner">
            <xsl:variable name="name">
              <xsl:value-of select="//Menu/MainMenu[@name='Outdoor Gear']/SubMenu[@name='Track / Field / Court / Indoors']/@name"/>
            </xsl:variable>
            <xsl:variable name="name1">
              <xsl:value-of select="@name"/>
            </xsl:variable>
            <xsl:element name="a">
              <xsl:attribute name="href">
                <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,'')"/>
              </xsl:attribute>
              <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
            </xsl:element>
          </span>
        </xsl:if>
        <xsl:for-each select="ChildMenu">
          <xsl:if test="@isdisplay=1">
            <span class="inner">
              <xsl:variable name="name">
                <xsl:value-of select="../../@name"/>
              </xsl:variable>
              <xsl:variable name="name1">
                <xsl:value-of select="../@name"/>
              </xsl:variable>
              <xsl:variable name="name2">
                <xsl:value-of select="@name"/>
              </xsl:variable>
              <xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,$name2)"/>
                </xsl:attribute>
                <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
              </xsl:element>
            </span>
          </xsl:if>
        </xsl:for-each>
      </xsl:for-each>

      <br clear="all"  />
      <h2>
        <xsl:variable name="name">
          <xsl:value-of select="SubMenu[@name='Hiking and Camping']/@name"/>
        </xsl:variable>
        <xsl:element name="a">
          <xsl:attribute name="href">
            <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,'','')"/>
          </xsl:attribute>
          <xsl:value-of select="SubMenu[@name='Hiking and Camping']/@displayname" disable-output-escaping="yes"/>
        </xsl:element>
      </h2>
      <xsl:for-each select="SubMenu[@name='Hiking and Camping']/SubSubMenu">
        <xsl:if test="@isdisplay=1">
          <span class="inner">
            <xsl:variable name="name">
              <xsl:value-of select="//Menu/MainMenu[@name='Outdoor Gear']/SubMenu[@name='Hiking and Camping']/@name"/>
            </xsl:variable>
            <xsl:variable name="name1">
              <xsl:value-of select="@name"/>
            </xsl:variable>
            <xsl:element name="a">
              <xsl:attribute name="href">
                <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,'')"/>
              </xsl:attribute>
              <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
            </xsl:element>
          </span>
        </xsl:if>
        <xsl:for-each select="ChildMenu">
          <xsl:if test="@isdisplay=1">
            <span class="inner">
              <xsl:variable name="name">
                <xsl:value-of select="../../@name"/>
              </xsl:variable>
              <xsl:variable name="name1">
                <xsl:value-of select="../@name"/>
              </xsl:variable>
              <xsl:variable name="name2">
                <xsl:value-of select="@name"/>
              </xsl:variable>
              <xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Outdoor Gear',$name,$name1,$name2)"/>
                </xsl:attribute>
                <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
              </xsl:element>
            </span>
          </xsl:if>
        </xsl:for-each>
      </xsl:for-each>
    </span>
  </xsl:template>

  <xsl:template match="//Menu/MainMenu[@name='Clothing / Footwear']">
    <span class="main">
      <h2>
        <xsl:variable name="name">
          <xsl:value-of select="SubMenu[@name='Mountain Running']/@name"/>
        </xsl:variable>
        <xsl:element name="a">
          <xsl:attribute name="href">
            <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Clothing / Footwear',$name,'','')"/>
          </xsl:attribute>
          <xsl:value-of select="SubMenu[@name='Mountain Running']/@displayname" disable-output-escaping="yes"/>
        </xsl:element>
      </h2>
      <xsl:for-each select="SubMenu[@name='Mountain Running']/SubSubMenu">
        <xsl:if test="@isdisplay=1">
          <span class="inner">
            <xsl:variable name="name">
              <xsl:value-of select="../@name"/>
            </xsl:variable>
            <xsl:variable name="name1">
              <xsl:value-of select="@name"/>
            </xsl:variable>
            <xsl:element name="a">
              <xsl:attribute name="href">
                <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Clothing / Footwear',$name,$name1,'')"/>
              </xsl:attribute>
              <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
            </xsl:element>
          </span>
        </xsl:if>
        <xsl:for-each select="ChildMenu">
          <xsl:if test="@isdisplay=1">
            <span class="inner">
              <xsl:variable name="name">
                <xsl:value-of select="../../@name"/>
              </xsl:variable>
              <xsl:variable name="name1">
                <xsl:value-of select="../@name"/>
              </xsl:variable>
              <xsl:variable name="name2">
                <xsl:value-of select="@name"/>
              </xsl:variable>
              <xsl:element name="a">
                <xsl:attribute name="href">
                  <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Clothing / Footwear',$name,$name1,$name2)"/>
                </xsl:attribute>
                <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
              </xsl:element>
            </span>
          </xsl:if>
        </xsl:for-each>
      </xsl:for-each>
    </span>
  </xsl:template>

  <xsl:template match="//Menu/MainMenu[@name='Electronics']">
    <table width="100%" border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td height="5"></td>
      </tr>
      <xsl:for-each select="SubMenu">
        <tr>
          <td class="">
            <xsl:variable name="name">
              <xsl:value-of select="@name"/>
            </xsl:variable>
            <xsl:element name="a">
              <xsl:attribute name="href">
                <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Electronics',$name,'','')"/>
              </xsl:attribute>
              <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
            </xsl:element>
          </td>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>

  <xsl:template match="//Menu/MainMenu[@name='Gifts']">
    <table width="100%" border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td height="5"></td>
      </tr>
      <xsl:for-each select="SubMenu">
        <tr>
          <td class="">
            <xsl:variable name="name">
              <xsl:value-of select="@name"/>
            </xsl:variable>
            <xsl:element name="a">
              <xsl:attribute name="href">
                <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Gifts',$name,'','')"/>
              </xsl:attribute>
              <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
            </xsl:element>
          </td>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>

  <xsl:template match="//Menu/MainMenu[@name='Petzl']">
    <table width="100%" border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td height="5"></td>
      </tr>
      <xsl:for-each select="SubMenu">
        <tr>
          <td class="">
            <xsl:variable name="name">
              <xsl:value-of select="@name"/>
            </xsl:variable>
            <xsl:element name="a">
              <xsl:attribute name="href">
                <xsl:value-of select="php:function('ClsXSLTFunction::makeFriendlyURL','Category.php','Petzl',$name,'','')"/>
              </xsl:attribute>
              <xsl:value-of select="@displayname" disable-output-escaping="yes"/>
            </xsl:element>
          </td>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>
</xsl:stylesheet>

If you face any problem please let me know.



标签: xml xslt