PHP で xslt パラメータを設定してから、変換を呼び出しています。XPath 式で param 値を使用して適切なノードを取得したいのですが、うまくいかないようです。可能だと思いますが、構文が欠けているだけだと思います。ここに私が持っているもの...
PHP:
$xslt->setParameter('','month','September');
XSL:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" />
<!-- Heres my param from the PHP -->
<xsl:param name="month" />
<!-- Here where I want it for grab the month node with the attribute name="September" but it doesn't work, gives me a compilation error -->
<xsl:template match="/root/year/month[@name = $month]">
<p>
<xsl:value-of select="$month" />
</p>
</xsl:template>