这只是正常:您可以在document()函数中使用XSL变量吗?
<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允许吗?如果没有,有没有人推荐使用动态变量打开文件的解决方案?
没有理由不应该工作,除非你的`$ full_issue_path`变量当然包含错误的值。你可以在输出中打印`$ issue_info_file`的值来看看它的评估结果是什么? – biziclop 2011-01-24 16:55:36
可能使用{} thingy – Treemonkey 2011-01-24 16:56:19