Page 1 of 1

XML Formatting Splits Node Text

Posted: Mon Jul 15, 2024 2:56 pm
by Jamil
I faced an XSLT issue earlier I was trying to resolve when I finally realized that oxygen editor caused the issue with Format & Indent of XML.

Here is pre format & indent:

Code: Select all

<rslt:file rslt:isfolder="false"><rslt:name>04-Doodlin&apos;.flac</rslt:name><rslt:path>E:\Art Blakey\1991, The History of Art Blakey And The Jazz Messengers\</rslt:path><rslt:modified>7/6/2024 12:16:07 AM</rslt:modified><rslt:created>7/6/2024 12:16:07 AM</rslt:created><rslt:lastaccess>7/6/2024 12:16:07 AM</rslt:lastaccess><rslt:modifiedft>133647129670000000</rslt:modifiedft><rslt:createdft>133647129670000000</rslt:createdft><rslt:lastaccessft>133647129670000000</rslt:lastaccessft><rslt:size>42,990.00 KB</rslt:size><rslt:sizebytes>44021520</rslt:sizebytes><rslt:attr>4225</rslt:attr><rslt:type>FLAC Audio File (VLC)</rslt:type></rslt:file>
Here is post format & indent:

Code: Select all

    <rslt:file rslt:isfolder="false">
        <rslt:name>04-Doodlin&apos;.flac</rslt:name>
        <rslt:path>E:\Art Blakey\1991, The History of Art Blakey And The Jazz
            Messengers\</rslt:path>
        <rslt:modified>7/6/2024 12:16:07 AM</rslt:modified>
        <rslt:created>7/6/2024 12:16:07 AM</rslt:created>
        <rslt:lastaccess>7/6/2024 12:16:07 AM</rslt:lastaccess>
        <rslt:modifiedft>133647129670000000</rslt:modifiedft>
        <rslt:createdft>133647129670000000</rslt:createdft>
        <rslt:lastaccessft>133647129670000000</rslt:lastaccessft>
        <rslt:size>42,990.00 KB</rslt:size>
        <rslt:sizebytes>44021520</rslt:sizebytes>
        <rslt:attr>4225</rslt:attr>
        <rslt:type>FLAC Audio File (VLC)</rslt:type>
    </rslt:file>
The problem with this is that is is creating new lines in the middle of node text that breaks XSLT. Is there an option to format and not do this? If the answer is no, please add this feature.

Re: XML Formatting Splits Node Text

Posted: Thu Jul 18, 2024 11:16 am
by Mircea
Hello Jamil,

If you want to avoid breaking lines by formatter in your case just go to "Options/Preferences/Editor/Format/Foma and Indent/Line Width", and set the line length to "1000".

Regards,
Mircea

Re: XML Formatting Splits Node Text

Posted: Thu Jul 18, 2024 4:07 pm
by Jamil
Thank you.
I don't remember this issue, so I probably had this set long ago. I got a new workstation and had to reinstall.