简体   繁体   English

XSLT之后Altova XMLSpy自动缩进

[英]Altova XMLSpy auto indent after XSLT

what i did was to open a ABC.xml file and performing XSLT on it by pressing F10 in Altova XMLSpy. 我所做的是打开ABC.xml文件,并通过在Altova XMLSpy中按F10对其执行XSLT。 An XSL Output.xml is generated, and the results is pretty messed up, ie much of the code is in 1-2 lines as all tags are not indented automatically, and it's very hard to read. 生成了XSL Output.xml,结果非常混乱,例如,由于所有标记都不会自动缩进,因此很多代码在1-2行中,并且很难阅读。 Is there a tool that i'm missing, or a function i'm not using? 是否有我缺少的工具,或者我没有使用的功能?

Add the xsl:output tag at the beginning of your XSLT (inside of xsl:stylesheet) and specify the desired output: 在XSLT的开头(在xsl:stylesheet的内部)添加xsl:output标记,并指定所需的输出:

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

The indent="yes" will improve the output - not everything on one line. indent =“ yes”将改善输出-并非一行上的所有内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM