Page 1 of 1

Format and Indent problem

Posted: Mon Dec 02, 2024 3:41 pm
by DanOvergaard
Hi,

I have a couple of problems with the Format and Indent I can't solve and hope for your help. The problem is located to one template as the rest of the XSLT behave as expected - keeping the empty lines


When i try to insert a new line between </xsl:if> <xsl:if > the "Format and Indent" remove them and place them on the same line

Whished formatting

Code: Select all

  <xsl:if test="Test something ''">
                </xsl:if >

                <xsl:if test="Something ''">
 </xsl:if>
If I the press "Format and Indent" I get

Code: Select all

   <xsl:if test="Test something ''">
                </xsl:if >  <xsl:if test="Something ''">
 </xsl:if>

When I insert a extra line between the 2 lines below it's removed when I push the "Format and Indent"

Code: Select all

        <xsl:copy-of select="cbc:Note" copy-namespaces="no" />
        <xsl:copy-of select="cbc:TaxPointDate" copy-namespaces="no" />

Note
In Options - Preferences - Editor - format - XML is have marked the "Perserve empty lines"

Regards,
Dan

Re: Format and Indent problem

Posted: Tue Dec 03, 2024 10:14 am
by Mircea
Hello Dan,

Please consider sending us a bigger sample to reproduce this behavior.
You can send an email at "support at oxygenxml dot com".
Also please let us know the exact version of Oxygen you are using.
Using just the lines you sent us, the behavior is as expected.

Regards,
Mircea.

Re: Format and Indent problem

Posted: Tue Dec 03, 2024 11:07 am
by DanOvergaard
Hello Mircea,

Thanks for your reply

I just fixed the problem by recreating the full template line by line, so I can't provide a example any longer.

The strange part was that it was bounded to the "text" in this one template as no other templates was effected - I even could copy the content of the template to a new XSLT filen and there it also behaved strangely.

Anyway the problem has gone, so the case is closed

Regards,
Dan