问题
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