Page 1 of 1
Fixing long lines?
Posted: Wed Jan 19, 2011 8:57 pm
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?
Re: Fixing long lines?
Posted: Thu Jan 20, 2011 10:32 am
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
Re: Fixing long lines?
Posted: Thu Jan 20, 2011 6:13 pm
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 '
right side single quotation mark transforms into ’
Re: Fixing long lines?
Posted: Thu Jan 20, 2011 6:33 pm
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
Re: Fixing long lines?
Posted: Thu Jan 20, 2011 6:53 pm
by yoshimura
You are correct, it happens when I perform a XSLT transformation. Is it possible to keep it from changing the characters?
Re: Fixing long lines?
Posted: Thu Jan 20, 2011 6:59 pm
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
Re: Fixing long lines?
Posted: Thu Jan 20, 2011 7:07 pm
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
Re: Fixing long lines?
Posted: Thu Jan 20, 2011 7:31 pm
by yoshimura
I used the Saxon 9 transformer and it works.
Thank you Radu.