Josh M.
Josh M.

Reputation: 27811

XSLT: XML to HTML Transform - No Line Breaks

I am transforming an XML document via XSLT into an HTML document. In my XSLT I have indent set to "yes." The resulting HTML is all on a single line except for where I have specifically inserted new-line characters. Why isn't the resulting HTML (XML) being formatted with new-lines and indents?

I'm using Oxygen to do the transform and the .Net 2.0 engine.

Upvotes: 3

Views: 1057

Answers (1)

peter.murray.rust
peter.murray.rust

Reputation: 38063

Try

<xsl:output method="html"/>

as a top-level element

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

Upvotes: 4

Related Questions