Eric van der Vlist 的 RelaxNG 简化的局限性
所有,
我正在尝试使用 Eric van der Vlist 的 simplification.xsl< 来简化 RelaxNG 模式/a>,但我收到错误:
runtime error: file ./simplification.xsl line 741 element element
xsl:element: The effective name '' is not a valid QName.
runtime error: file ./simplification.xsl line 751 element element
xsl:element: The effective name '' is not a valid QName.
runtime error: file ./simplification.xsl line 759 element element
xsl:element: The effective name '' is not a valid QName.
runtime error: file ./simplification.xsl line 759 element element
xsl:element: The effective name '' is not a valid QName.
runtime error: file ./simplification.xsl line 759 element element
xsl:element: The effective name '' is not a valid QName.
它似乎与动态构造的某些名称有关:
<xsl:template match="rng:start[not(preceding-sibling::rng:start) and following-sibling::rng:start]" mode="step7.18">
<xsl:copy>
<xsl:apply-templates select="@*" mode="step7.18"/>
<xsl:element name="{parent::*/rng:start/@combine}">
<xsl:call-template name="start7.18"/>
</xsl:element>
</xsl:copy>
</xsl:template>
我还没有开始更深入地研究它,但也许有人已经知道可能导致此问题的原因。
All,
I am trying to simplify a RelaxNG schema using Eric van der Vlist's simplification.xsl, but I'm getting errors:
runtime error: file ./simplification.xsl line 741 element element
xsl:element: The effective name '' is not a valid QName.
runtime error: file ./simplification.xsl line 751 element element
xsl:element: The effective name '' is not a valid QName.
runtime error: file ./simplification.xsl line 759 element element
xsl:element: The effective name '' is not a valid QName.
runtime error: file ./simplification.xsl line 759 element element
xsl:element: The effective name '' is not a valid QName.
runtime error: file ./simplification.xsl line 759 element element
xsl:element: The effective name '' is not a valid QName.
It seems it has something to do with some names getting constructed dynamically:
<xsl:template match="rng:start[not(preceding-sibling::rng:start) and following-sibling::rng:start]" mode="step7.18">
<xsl:copy>
<xsl:apply-templates select="@*" mode="step7.18"/>
<xsl:element name="{parent::*/rng:start/@combine}">
<xsl:call-template name="start7.18"/>
</xsl:element>
</xsl:copy>
</xsl:template>
I haven't started getting into it any deeper, but perhaps someone already has a clue on what might be causing this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有什么理由不使用 jing -s 来代替吗?
Is there some reason not to use jing -s instead?
显然,我不是第一个遇到这些问题的人。 此网站还提到了运行 simplification.xsl 时出现的一些问题,并包含一些修复。我只是把它复制在这里,以供将来参考。
在给定网站中复制我原来的 RelaxNG 语法后,整个转换完成,没有任何问题。
Apparently, I wasn't the first one to run into these issues. This web site also refers to some problems running simplification.xsl, and includes some fixes. I'm just copying it in here, for future reference.
After copying in my original RelaxNG grammar in the given web site, the whole transformation completes without any problem.