全,
我正在尝试使用Eric van der Vlist's simplification.xsl来简化RelaxNG模式,但遇到了错误:
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>我还没有开始更深入地研究它,但也许有人已经对可能导致这种情况的原因有了线索。
发布于 2011-02-25 05:57:20
显然,我不是第一个遇到这些问题的人。This web site还提到了一些运行simplification.xsl的问题,并包含了一些修复。我只是把它复制到这里,以备将来参考。
第10步中的
<xsl:with-param name="node-name" select="'rng:group'"/>。第14步中的<xsl:with-param name="node-name" select="'rng:group'"/>中的"combine”属性值之前添加前缀"rng:“的串联步骤14 :在模板<xsl:template match="rng:start[not(preceding-sibling::rng:start) and following-sibling::rng:start]">中,我删除了元素add <xsl:element name="{parent::*/rng:start/@combine}">,因为它会导致在<rng:start>.<xsl:element name="{parent::*/rng:start/@combine}">>d15<rng:choice> >周围出现额外的<rng:choice>第15步:似乎该模板<xsl:template match="/*">比模板<xsl:template match="/rng:grammar">具有更高的优先级,所以我必须添加一个precision:<xsl:template match="/*[not(self::rng:grammar)]">.<parentRef>.的“"rng:parentRef/@name"”属性中生成的id,我必须添加一个精度:<xsl:template match="/*[not(self::rng:grammar)]">.
<xsl:template match="rng:define|rng:define/@name|rng:ref/@name|rng:parentRef/@name"/>在给定网站中复制我的原始RelaxNG语法之后,整个转换就完成了,没有任何问题。
发布于 2011-03-02 03:18:31
有没有什么理由不使用jing -s呢?
https://stackoverflow.com/questions/5102313
复制相似问题