XSLT-动态变量

时间:2019-05-15 09:58:07

标签: xml xslt xslt-1.0 xslt-2.0

我希望输出包含实际日期的文件名的动态参数。但是即时输出为It was not possible to create a Template from XSL file: Failed to compile stylesheet. 1 error detected.

    <root>
        <xsl:variable name="FileName">
            documentname="<xsl:value-of select="Request/Query/Parameter[@name='Dokumentart']"></xsl:value-of>.
            <xsl:value-of select="Request/Query/Parameter[@name='Belegnummer']."></xsl:value-of>
            <xsl:value-of select="format-date(current-date(),'[Y0001]-[M01]-[D01]')"></xsl:value-of>.pdf"
        </xsl:variable>
        <xsl:variable name="FilePath">
            path="C:/"
        </xsl:variable>

        <xsl:processing-instruction name="DynamicParameter">
            <xsl:value-of select="$FileName"></xsl:value-of>
        </xsl:processing-instruction>
        <xsl:processing-instruction name="DynamicParameter">
            <xsl:value-of select="$FilePath"></xsl:value-of>
        </xsl:processing-instruction>
    </root>

0 个答案:

没有答案
相关问题