gpt4 book ai didi

xslt - 如何使 xsl 转换缩进输出?

转载 作者:行者123 更新时间:2023-12-04 01:21:17 26 4
gpt4 key购买 nike

我正在使用带有以下 xsl header 的 xalan:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:redirect="http://xml.apache.org/xalan/redirect"
extension-element-prefixes="redirect"
xmlns:xalan="http://xml.apache.org/xalan">
<xsl:output method="text" indent="yes" xalan:indent-amount="4"/>

并且输出没有缩进。

有人有想法吗?

最佳答案

对于缩进,您需要使用不同的命名空间:http://xml.apache.org/xslt (见 this issue)

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:redirect="http://xml.apache.org/xalan/redirect"
extension-element-prefixes="redirect"
xmlns:xalan="http://xml.apache.org/xslt">
<xsl:output method="xml" indent="yes" xalan:indent-amount="4"/>

关于xslt - 如何使 xsl 转换缩进输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2402212/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com