How to apply xpath in xsl:param on xml passed as input to xml

独自空忆成欢 提交于 2019-12-11 23:57:03

问题


I have one XSLT and XML input for XSLT like below

XML file:

<root>
    <a>
        <b>
            <c>hi</c>
        </b>
    </a>

    <a>
        <b>
            <c>hi</c>
        </b>
    </a>
</root>

XSL file:

<xsl:stylesheet>
      <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
      <xsl:param name="/a//b//c"/>
      <xsl:for-each select="/a//b//c">
          <xsl:element name="celement">
              <xsl:copy-of select="c element"/>
          </xsl:element>
      </xsl:for-each>

How do I transform the XML using XPATH in xsl:param in XSLT?

来源:https://stackoverflow.com/questions/35246061/how-to-apply-xpath-in-xslparam-on-xml-passed-as-input-to-xml

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!