Issue WIth Canonicalize

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Jamil
Posts: 99
Joined: Thu Oct 23, 2008 6:29 am

Issue WIth Canonicalize

Post by Jamil »

I just ran into an issue with the canonicalize feature under Oxygen 15.1 build 2013110816. I am not sure how long this issue has been present, but it is currently in this build.

The problem is that the application attempts to canonicalize an XML document if the tags have been locked. This feature should be disabled when the XML tags have been locked. The application attempts to canonicalize anyway, but it fails part way through. The result is an invalid XML document.

There may be more actions that share this issue, but this is the first one I have found.
Jamil
Posts: 99
Joined: Thu Oct 23, 2008 6:29 am

Re: Issue WIth Canonicalize

Post by Jamil »

Secondly, canonicalize currently replaces all comments with whitespace. This is not desired, and it shows for both exclusive and inclusive if you do not choose to preserve comments. Can you please remove the extra whitespace that result when comments are removed? This shows as blank lines in the document.
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Issue WIth Canonicalize

Post by adrian »

Hello,

Regarding the first issue, I have submitted a bug on our issue tracking tool and it will be analyzed and resolved.

Regarding the second issue, I don't see a problem here. After canonicalizing the comments are removed and all there's left behind are the indent whitespaces (if any) which were outside the comments.
It's normal for these indents to remain there, the canonicalization does not format or normalize whitespaces from the document.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jamil
Posts: 99
Joined: Thu Oct 23, 2008 6:29 am

Re: Issue WIth Canonicalize

Post by Jamil »

The second issue may be working as intended. The issue then is there is no way that Oxygen will remove this excess whitespace (that really is undesired) automatically. Format and Indent will not remove it.

As a work-around, I can doing multiple search and replaces using a regular expression:

Search for: \n\n
Replace with: \n

I have to do this over and over until all the blank lines are gone.
Jamil
Posts: 99
Joined: Thu Oct 23, 2008 6:29 am

Re: Issue WIth Canonicalize

Post by Jamil »

Format and Indent will remove blank line. The problem was that I had the option preserver blank lines turned on. Turning this off removes the blank lines, so never mind. Thanks for looking into this.
Post Reply