,我有以下類型的XML文檔輸出:XSL:的 「嵌套」 結構
<item>
<item>
<item>
... (same elements <item> ... </item> here)
</item>
</item>
</item>
...及以下XSL變換:
<xsl:template match="item"><xsl:text>
open</xsl:text>
<xsl:apply-templates/><xsl:text>
close</xsl:text>
</xsl:template>
我得到的是:
open
open
open
close
close
close
所以我不知道是否有可能以某種方式得到一個輸出與縮進像此:
open
open
open
close
close
close
感謝您的幫助!
P.S.通過讓轉換的輸出方法爲HTML,應該可以獲得我想要的。但是,我需要在文本中「直接」縮進,而不是使用任何類型的HTML列表等。