xslt - 在 XSLT 3.0 中显示无效的 xpath
问题描述
这个 xslt 有什么错误?它说 <xsl:copy-of select="current-group()"/> 行中的 xpath 无效,尽管当我使用 xslt 2.0 版(无流式传输)时它工作正常。
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wd="urn:com.workday/bsvc"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
exclude-result-prefixes="xs"
version="3.0">
<xsl:mode streamable="yes" on-no-match="shallow-skip"/>
<xsl:param name="BlockSize" as="xs:integer" select="2000"/>
<xsl:strip-space elements="*"/>
<xsl:output indent="yes"/>
<xsl:template match="/">
<root>
<xsl:for-each-group select="root/wd:Get_Workers_Response/wd:Response_Data/wd:Worker" group-adjacent="floor((position() -1) div $BlockSize)">
<group>
<xsl:copy-of select="current-group()"/> <-- ERROR - Invalid Xpath
</group>
</xsl:for-each-group>
</root>
</xsl:template>
</xsl:stylesheet>
在这里,我试图将 xml 中的工人列表分组为几组,每组 2000 名工人。
解决方案
问题在于配置。禁用 xsl 验证器(窗口 > 首选项 > 验证)解决了这个问题。
推荐阅读
- html - Flexbox 重叠
- python - 在 python 中使用面板 ols 进行 Wald 测试
- javascript - React-Native:删除android屏幕顶部的空格
- php - 如何在函数之外获取变量值以与 OFFSET 一起使用
- python - 如何使用 API 从 Earth Explorer 下载信息?
- python - Python - 事件循环的无效语法(maze_run-master)
- python - 如何存储递归图函数中的值?
- c++ - 如何将int转换为chrono毫秒
- go - 为什么并行化会减慢我的程序速度?
- python - 逐字符python分割阿拉伯语单词