oXygen-8.2 XHTML Format and Indent Errors

Upgraded from oXygen-8.1 to v8.2; note the following XHTML code block: <style type="text/css" media="screen,print"> @import url(http://www.foo.com/foo_files/styles/foo-styles.css); @import url(http://www.foo.com/foo_files/styles/foo-user-styles.css); @import url(http://www.foo.com/foo_files/styles/top-menu-styles.css); @import url(http://www.foo.com/foo_files/styles/side-menu-styles.css); </style> When Format and Indent is applied, the following results: <style type="text/css" media="screen,print"> //www.foo.com/foo_files/styles/foo-styles.css);@import url(http: //www.foo.com/foo_files/styles/foo-user-styles.css);@import url(http: //www.foo.com/foo_files/styles/top-menu-styles.css);@import url(http: //www.foo.com/foo_files/styles/side-menu-styles.css);@import url(http:</style> style is included Editor / Format / XML / Preserve Space Elements This did not occur in v8.1 Please advise. Ray

Dear Ray, Thanks! There are two problems here 1. The format and indent of CSS does not handle correctly the example you posted. You can enclose the url argument in quotes as a workaround, for instance: @import url("http://www.foo.com/foo_files/styles/foo-styles.css"); 2. The format and indent does not take into account xml:space for script and style elements. We are working on fixing these as I write and we will make the fix available in a new 8.2 build. Best Regards, George --------------------------------------------------------------------- George Cristian Bina - http://aboutxml.blogspot.com/ <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Miller, Ray (Centech) wrote:
Upgraded from oXygen-8.1 to v8.2; note the following XHTML code block:
<style type="text/css" media="screen,print">
@import url(http://www.foo.com/foo_files/styles/foo-styles.css);
@import url(http://www.foo.com/foo_files/styles/foo-user-styles.css);
@import url(http://www.foo.com/foo_files/styles/top-menu-styles.css);
@import url(http://www.foo.com/foo_files/styles/side-menu-styles.css);
</style>
When Format and Indent is applied, the following results:
<style type="text/css" media="screen,print">
//www.foo.com/foo_files/styles/foo-styles.css);@import url(http:
//www.foo.com/foo_files/styles/foo-user-styles.css);@import url(http:
//www.foo.com/foo_files/styles/top-menu-styles.css);@import url(http:
//www.foo.com/foo_files/styles/side-menu-styles.css);@import url(http:</style>
style is included Editor / Format / XML / Preserve Space Elements
This did not occur in v8.1
Please advise.
Ray
------------------------------------------------------------------------
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hello, Now there is a new build of oXygen 8.2 available on the Download page which fixes the format and indent problems: http://www.oxygenxml.com/download.html Regards, Sorin George Cristian Bina wrote:
Dear Ray,
Thanks! There are two problems here 1. The format and indent of CSS does not handle correctly the example you posted. You can enclose the url argument in quotes as a workaround, for instance: @import url("http://www.foo.com/foo_files/styles/foo-styles.css"); 2. The format and indent does not take into account xml:space for script and style elements.
We are working on fixing these as I write and we will make the fix available in a new 8.2 build.
Best Regards, George --------------------------------------------------------------------- George Cristian Bina - http://aboutxml.blogspot.com/ <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com
Miller, Ray (Centech) wrote:
Upgraded from oXygen-8.1 to v8.2; note the following XHTML code block:
<style type="text/css" media="screen,print">
@import url(http://www.foo.com/foo_files/styles/foo-styles.css);
@import url(http://www.foo.com/foo_files/styles/foo-user-styles.css);
@import url(http://www.foo.com/foo_files/styles/top-menu-styles.css);
@import url(http://www.foo.com/foo_files/styles/side-menu-styles.css); </style>
When Format and Indent is applied, the following results:
<style type="text/css" media="screen,print">
//www.foo.com/foo_files/styles/foo-styles.css);@import url(http:
//www.foo.com/foo_files/styles/foo-user-styles.css);@import url(http:
//www.foo.com/foo_files/styles/top-menu-styles.css);@import url(http:
//www.foo.com/foo_files/styles/side-menu-styles.css);@import url(http:</style>
style is included Editor / Format / XML / Preserve Space Elements
This did not occur in v8.1
Please advise.
Ray

Hi, I am still getting a problem on paste (JavaScript) in an script element that has has been added to the preserve space list in the preferences (well, it was there by default). ...just played around with the preferences a bit... It seems you need to uncheck 'Indent (when typing) in preserve space elements' to keep the original formatting on paste. You can still check 'Indent on paste - for line...' so the XML gets pretty printed. Perhaps this worked all along :). Maybe just remove the '(when typing)' in the option text to make it clearer ?? But if both the above options are checked in the Options/Preferences/Editor/Format/XML dialog then pasting something like: if (true) { alert('boo'); } into a script element becomes: <script> if (true) { alert('boo'); } </script> best, -Rob On Mon, 2007-05-21 at 10:39 +0300, Sorin Ristache wrote:
Hello,
Now there is a new build of oXygen 8.2 available on the Download page which fixes the format and indent problems:
http://www.oxygenxml.com/download.html
Regards, Sorin
George Cristian Bina wrote:
Dear Ray,
Thanks! There are two problems here 1. The format and indent of CSS does not handle correctly the example you posted. You can enclose the url argument in quotes as a workaround, for instance: @import url("http://www.foo.com/foo_files/styles/foo-styles.css"); 2. The format and indent does not take into account xml:space for script and style elements.
We are working on fixing these as I write and we will make the fix available in a new 8.2 build.
Best Regards, George --------------------------------------------------------------------- George Cristian Bina - http://aboutxml.blogspot.com/ <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com
Miller, Ray (Centech) wrote:
Upgraded from oXygen-8.1 to v8.2; note the following XHTML code block:
<style type="text/css" media="screen,print">
@import url(http://www.foo.com/foo_files/styles/foo-styles.css);
@import url(http://www.foo.com/foo_files/styles/foo-user-styles.css);
@import url(http://www.foo.com/foo_files/styles/top-menu-styles.css);
@import url(http://www.foo.com/foo_files/styles/side-menu-styles.css); </style>
When Format and Indent is applied, the following results:
<style type="text/css" media="screen,print">
//www.foo.com/foo_files/styles/foo-styles.css);@import url(http:
//www.foo.com/foo_files/styles/foo-user-styles.css);@import url(http:
//www.foo.com/foo_files/styles/top-menu-styles.css);@import url(http:
//www.foo.com/foo_files/styles/side-menu-styles.css);@import url(http:</style>
style is included Editor / Format / XML / Preserve Space Elements
This did not occur in v8.1
Please advise.
Ray
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hello, When the option "Indent (when typing) in preserve space elements" is unchecked the pasted block is preserved without applying indenting and it works correctly. We added "when typing" because it is used only when editing text with the keyboard but it is not used by the Format and Indent action so I think the two words should not be removed. When both options are checked the indenting is not correct when you paste CSS code in a script element. You reported the problem some days ago: http://www.oxygenxml.com/pipermail/oxygen-user/2007-May/001126.html but it was not planned for this build. We will fix it in a future version of oXygen. Regards, Sorin Robert Koberg wrote:
Maybe just remove the '(when typing)' in the option text to make it clearer ??
But if both the above options are checked in the Options/Preferences/Editor/Format/XML dialog then pasting something like:
if (true) { alert('boo'); } into a script element becomes: <script> if (true) { alert('boo'); } </script>

I am not sure I understand what you are saying... How can you detect what was added by the keyboard (or some other input method) versus existing text, pasted or generated? And why should it matter? I don't see the point - probably missing something. On Mon, 2007-05-21 at 14:57 +0300, Sorin Ristache wrote:
Hello,
When the option "Indent (when typing) in preserve space elements" is unchecked the pasted block is preserved without applying indenting and it works correctly. We added "when typing" because it is used only when editing text with the keyboard but it is not used by the Format and Indent action so I think the two words should not be removed.
When both options are checked the indenting is not correct when you paste CSS code in a script element. You reported the problem some days ago:
http://www.oxygenxml.com/pipermail/oxygen-user/2007-May/001126.html
but it was not planned for this build. We will fix it in a future version of oXygen.
Regards, Sorin
Robert Koberg wrote:
Maybe just remove the '(when typing)' in the option text to make it clearer ??
But if both the above options are checked in the Options/Preferences/Editor/Format/XML dialog then pasting something like:
if (true) { alert('boo'); } into a script element becomes: <script> if (true) { alert('boo'); } </script>
oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hello, The option that contains "Indent (when typing)" in name should be applied only for text inserted by typing the characters directly in the document. The option that contains "Indent on paste" should be applied only for a block of text pasted in the edited document. I see that the first option changes the indenting of text pasted in a <script> element but it should not have any effect on pasted text. Only the second one should have an effect on pasted text. We will fix that. Regards, Sorin Robert Koberg wrote:
I am not sure I understand what you are saying... How can you detect what was added by the keyboard (or some other input method) versus existing text, pasted or generated? And why should it matter? I don't see the point - probably missing something.
On Mon, 2007-05-21 at 14:57 +0300, Sorin Ristache wrote:
Hello,
When the option "Indent (when typing) in preserve space elements" is unchecked the pasted block is preserved without applying indenting and it works correctly. We added "when typing" because it is used only when editing text with the keyboard but it is not used by the Format and Indent action so I think the two words should not be removed.
When both options are checked the indenting is not correct when you paste CSS code in a script element. You reported the problem some days ago:
http://www.oxygenxml.com/pipermail/oxygen-user/2007-May/001126.html
but it was not planned for this build. We will fix it in a future version of oXygen.
Regards, Sorin
Robert Koberg wrote:
Maybe just remove the '(when typing)' in the option text to make it clearer ??
But if both the above options are checked in the Options/Preferences/Editor/Format/XML dialog then pasting something like:
if (true) { alert('boo'); } into a script element becomes: <script> if (true) { alert('boo'); } </script>
participants (4)
-
George Cristian Bina
-
Miller, Ray (Centech)
-
Robert Koberg
-
Sorin Ristache