gpt4 book ai didi

xml - 可以在 document() 函数中使用 XSL 变量吗?

转载 作者:数据小太阳 更新时间:2023-10-29 02:59:13 26 4
gpt4 key购买 nike

这很好用:

<xsl:variable 
name="issue_info_file"
select="document('/issues/2010/12/08/info.xml')
/page-components/issue-metadata-component/title"/>

但这不是:

<xsl:variable 
name="issue_info_file"
select="string(concat($full_issue_path,'/info.xml'))"/>
<xsl:variable
name="issue_title"
select="document($issue_info_file)
/page-components/issue-metadata-component/title"/>

有人知道 XSLT 是否允许这样做吗?如果没有,有人推荐使用动态变量打开文件的解决方案吗?

最佳答案

我不知道这个问题是否仍然存在,但似乎没有答案。我的 XSL 文件中有这段代码。

<xsl:variable name="docRoot">../sitemap/</xsl:variable>
<xsl:variable name="fullDocRoot" select="string(concat($docRoot,'sitemap.xml'))"/>
<xsl:for-each select="document($fullDocRoot)/root/sitemap/loc">

希望对某人有所帮助。

关于xml - 可以在 document() 函数中使用 XSL 变量吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4784495/

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