saxon:indent-spaces 属性被忽略 [英] saxon:indent-spaces attribute is being ignored
本文介绍了saxon:indent-spaces 属性被忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的问题这里试图将参数传递给我的样式表,以便用户可以指定所需的缩进级别.显然 Xalan 无法将参数的值读入其 indent-amount
属性,所以我正在尝试 代替这个版本的撒克逊-HE.
In my question here I'm trying to pass in a param to my stylesheet so a user can specify the level of indentation desired. Apparently Xalan cannot read the value of a param into its indent-amount
attribute, so I'm trying with this version of Saxon-HE instead.
Saxon 有属性 indent-spaces 我试图使用如下:
Saxon has the attribute indent-spaces which I am trying to use as follows:
<xsl:stylesheet
version="2.0"
xmlns:saxon="http://saxon.sf.net"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- <xsl:param name="indent-spaces" select="0"/> -->
<xsl:output indent="yes" method="xml" omit-xml-declaration="yes" saxon:indent-spaces="10"/><!-- Doesn't matter what I make the value of indent-spaces, the output is always indented 3 spaces -->
为什么 indent-spaces
会被忽略?
推荐答案
命名空间应该是 xmlns:saxon="http://saxon.sf.net/"
而不是 xmlns:saxon="http://saxon.sf.net"
.
The namespace should be xmlns:saxon="http://saxon.sf.net/"
instead of xmlns:saxon="http://saxon.sf.net"
.
这篇关于saxon:indent-spaces 属性被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文