XSLT: Convert XML to HTML - No Line Breaks

I am converting an XML document through XSLT to an HTML document. In my XSLT, I have the indent set to yes. The resulting HTML file is on the same line, unless I specifically inserted newline characters. Why isn't HTML (XML) formatted with newlines and indents?

I use Oxygen to convert and .NET 2.0 engine.

+3
source share
1 answer

Try

<xsl:output method="html"/>

as a top level item

EDIT: see comments. The default value for @indent on method = "html" is "yes", and for xml it is "no"

+4
source

Source: https://habr.com/ru/post/1782951/


All Articles