Fixing long lines?

Oxygen general issues.
yoshimura
Posts: 5
Joined: Wed Jan 19, 2011 5:27 am

Fixing long lines?

Post by yoshimura »

When I export an XML from InDesign, I'm prompted with this when I open it in Oxygen:
This document contains long lines which may affect performance when opened in the text editor.The longest line contains 113,292 characters.
This warning is displayed only for documents with lines exceeding 15,000 characters (see the Editor -> Open/Save page from Preferences).

Some of the editing features will be disabled.
Is there a way for Oxygen able to take the giant line of code and automatically structure the file?
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Fixing long lines?

Post by Radu »

Hi,

In the Oxygen Preferences->Editor / Format page you can check the checkbox Format and indent the document on open before opening the file which comes on a single line. Then uncheck it again if no longer necessary.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
yoshimura
Posts: 5
Joined: Wed Jan 19, 2011 5:27 am

Re: Fixing long lines?

Post by yoshimura »

Thank you Radu, that worked.

On a second note, is there a way for Oxygen to not transform characters like:

apostrophe transforms into &apos;
right side single quotation mark transforms into &#8217;
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Fixing long lines?

Post by Radu »

Hi,

At what stage do you think Oxygen transforms the characters?
It does not do this when Format and indent is applied.

Do you mean when performing XSLT transformations? But I could not reproduce this either.
It probably depends on the encoding of the output file, probably the XSLT transformer detects that some characters in the XML are over the range and escapes them.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
yoshimura
Posts: 5
Joined: Wed Jan 19, 2011 5:27 am

Re: Fixing long lines?

Post by yoshimura »

You are correct, it happens when I perform a XSLT transformation. Is it possible to keep it from changing the characters?
Radu
Posts: 9059
Joined: Fri Jul 09, 2004 5:18 pm

Re: Fixing long lines?

Post by Radu »

Hi,

What XSLT transformer type are you using in the transformation scenario? Saxon 6, 9 or Xalan?

In the XSLT stylesheet do you have an encoding set for the output file like:

Code: Select all

<xsl:output method="xml" encoding="CP857"/>
?
As I said if you're specifying an encoding in which the characters cannot be written they will be automatically escaped by the XSLT processor.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
yoshimura
Posts: 5
Joined: Wed Jan 19, 2011 5:27 am

Re: Fixing long lines?

Post by yoshimura »

Radu wrote:What XSLT transformer type are you using in the transformation scenario? Saxon 6, 9 or Xalan?
I'm using Saxon 6.5.5
Radu wrote: In the XSLT stylesheet do you have an encoding set for the output file like:

Code: Select all

<xsl:output method="xml" encoding="CP857"/>
I do not have an encoding set like that. I don't see any output method code. Only the following on the top:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
Regards,
Eric
yoshimura
Posts: 5
Joined: Wed Jan 19, 2011 5:27 am

Re: Fixing long lines?

Post by yoshimura »

I used the Saxon 9 transformer and it works.

Thank you Radu.
Post Reply