Weird indentation in xs:annotation/xs:documentation

Hi, When indenting the content of an xs:documentation in an XML schema (using C-i), the indentation algorithm seems to treat the first line differently. For instance, in the following schema, the first line is indented at about column 80, and the two subsequent lines are indented at about column 100: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:simpleType name="foobar"> <xs:annotation> <xs:documentation> <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p> </xs:documentation> </xs:annotation> </xs:simpleType> </xs:schema> Any idea? Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/

Hi Florent, C-i is indent selection and it performs only indenting, not format and indent. C-Shift-i is format and indent element and that should perform a format and indent action on the current element, and indeed I see that does not break the line where it should (similar to where the format and indent action on the whole document split it) so we have to look into that. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 3/19/13 6:07 PM, Florent Georges wrote:
Hi,
When indenting the content of an xs:documentation in an XML schema (using C-i), the indentation algorithm seems to treat the first line differently. For instance, in the following schema, the first line is indented at about column 80, and the two subsequent lines are indented at about column 100:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:simpleType name="foobar"> <xs:annotation> <xs:documentation> <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p> </xs:documentation> </xs:annotation> </xs:simpleType> </xs:schema>
Any idea?
Regards,

Thank you George. By the way, you are right about C-S-i on Windows, but it looks like both actions are bound to "cmd-i" on Mac (sorry I said "C-i", but this is the key labeled on my laptop "cmd", I think it used to be an apple before). Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ ----- Mail original -----
De : George Cristian Bina <george@oxygenxml.com> À : Florent Georges <lists@fgeorges.org> Cc : oXygen User ML <oxygen-user@oxygenxml.com> Envoyé le : Mardi 19 mars 2013 23h27 Objet : Re: [oXygen-user] Weird indentation in xs:annotation/xs:documentation
Hi Florent,
C-i is indent selection and it performs only indenting, not format and indent. C-Shift-i is format and indent element and that should perform a format and indent action on the current element, and indeed I see that does not break the line where it should (similar to where the format and indent action on the whole document split it) so we have to look into that.
Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com
On 3/19/13 6:07 PM, Florent Georges wrote:
Hi,
When indenting the content of an xs:documentation in an XML schema (using C-i), the indentation algorithm seems to treat the first line differently. For instance, in the following schema, the first line is indented at about column 80, and the two subsequent lines are indented at about column 100:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:simpleType name="foobar"> <xs:annotation> <xs:documentation> <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</p> </xs:documentation> </xs:annotation> </xs:simpleType> </xs:schema>
Any idea?
Regards,

Hello Florent, I've looked at the default shortcut keys on the Mac and they are distinct for these actions: "Format and Indent Element" is Cmd-Shift-I "Indent Selection" is Cmd-I Go to Options > Menu Shortcut Keys and type in the text filter "indent". You should see the shortcuts for both actions. If they are the same, you may have changed one of them in the past, or maybe they were imported from an older version of Oxygen. If you don't have other customized shortcut keys, you can simply press the "Restore Defaults" button from the "Menu Shortcut Keys" option page. Regards, Adrian Adrian Buza oXygen XML Editor and Author Support Tel: +1-650-352-1250 ext.202 Fax: +40-251-461482 support@oxygenxml.com http://www.oxygenxml.com Florent Georges wrote:
Thank you George. By the way, you are right about C-S-i on Windows, but it looks like both actions are bound to "cmd-i" on Mac (sorry I said "C-i", but this is the key labeled on my laptop "cmd", I think it used to be an apple before).
Regards,

Yes indeed, they were redefined, I restored them to default. I never quite understood why I used C-i on my Mac and C-S-i on the Windows machines at my clients where I install sometimes oXygen. I guess C-i was just carried over from an old version, I've kept installing them for years on my Mac laptop ;-) Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ ----- Mail original -----
De : Oxygen XML Editor Support À : Florent Georges Cc : George Cristian Bina; oXygen User ML Envoyé le : Mercredi 20 mars 2013 13h14 Objet : Re: [oXygen-user] Weird indentation in xs:annotation/xs:documentation
Hello Florent,
I've looked at the default shortcut keys on the Mac and they are distinct for these actions: "Format and Indent Element" is Cmd-Shift-I "Indent Selection" is Cmd-I
Go to Options > Menu Shortcut Keys and type in the text filter "indent". You should see the shortcuts for both actions. If they are the same, you may have changed one of them in the past, or maybe they were imported from an older version of Oxygen.
If you don't have other customized shortcut keys, you can simply press the "Restore Defaults" button from the "Menu Shortcut Keys" option page.
Regards, Adrian
Adrian Buza oXygen XML Editor and Author Support
Tel: +1-650-352-1250 ext.202 Fax: +40-251-461482 support@oxygenxml.com http://www.oxygenxml.com
Thank you George. By the way, you are right about C-S-i on Windows, but it looks like both actions are bound to "cmd-i" on Mac (sorry I said "C-i", but this is the key labeled on my laptop "cmd", I
Florent Georges wrote: think it used to be an apple before).
Regards,

Hi Florent, Yes, at some point both actions had the same shortcut, CMD+I and, if I recall correctly, when you had a selection the "Indent selection" action was triggered, while when you did not have a selection the "Format and indent element" was triggered - which was not that bad :). But I guess it is better to have different shortcuts for different actions to have a more predictable behavior. Best Regards, George -- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 3/21/13 4:29 PM, Florent Georges wrote:
Yes indeed, they were redefined, I restored them to default.
I never quite understood why I used C-i on my Mac and C-S-i on the Windows machines at my clients where I install sometimes oXygen. I guess C-i was just carried over from an old version, I've kept installing them for years on my Mac laptop ;-)
Regards,
participants (3)
-
Florent Georges
-
George Cristian Bina
-
Oxygen XML Editor Support