gpt4 book ai didi

xslt - XSLT 文件的名称(不是输入 XML)

转载 作者:行者123 更新时间:2023-11-30 23:48:24 27 4
gpt4 key购买 nike

这是我的 XSLT 中的前两行:

<xsl:variable name="BaseUri" select="fn:base-uri()"/>
<xsl:variable name="DocumentURI" select="fn:document-uri(.)"/>

两个变量包含相同的内容,即处理后的 XML 文件的 URI。

如何获取 XSLT 文件的 URI?

最佳答案

试试这个:

<xsl:variable name="stylesheetURI" select="fn:document-uri(fn:document(''))"/>

这是 XSLT-only document 函数的一个奇怪特性,在此处的注释中进行了描述:

https://www.w3.org/TR/xslt20/#function-document

关于xslt - XSLT 文件的名称(不是输入 XML),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59271088/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com