Page 1 of 1

Transformer line breaks on attributes.

Posted: Wed Aug 15, 2012 1:35 pm
by William
Hello Everyone,

Using Saxon-EE 9.4.0.3 with this as an output element:

Code: Select all


<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
My transformed XML comes out looking like this:

Code: Select all


<row attr_1="aaa"
attr_2="bbb"
attr_3="ccc"
attr_4="ddd"
attr_5="eee"
...
attr_x="xxx"/>
Needless to say this is not what I want. From Options > Preferences (Editor / Format) I have already set the "Line Width - Format and Indent" to 2000. I know the physical format is irrelevant in the context of XML but when you're trying to scan the output after processing it's tedious to say the least.

Is anyone able to help me here please?

--
William

Re: Transformer line breaks on attributes.

Posted: Thu Aug 16, 2012 12:59 pm
by adrian
Hello,

Please note that the transformer output is not formatted by Oxygen. So any options you may have set in Options > Preferences, Editor > Format won't affect the output in any way.

There is one limited situation where this could happen indirectly, if you have configured the transformation scenario to save the output to a file, open it in an editor and at the same time Oxygen is configured to "Format and indent the document on open" (in Editor > Format). Disable this option if enabled (by default it's disabled).

Otherwise the transformer is the one formatting the output using the xsl:output directive from the stylesheet and possibly some Saxon settings. Check if you have explicitly set a Saxon configuration file in the Oxygen preferences (Options > Preferences, XML > XSLT-FO-XQuery > XSLT > Saxon > Saxon-HE/PE/EE) or the transformation scenario (Advanced options button next to the Transformer combo box).

Regards,
Adrian