Keyboard selection of elements in Author mode is odd; what am I doing wrong?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Graham Hannington
Posts: 48
Joined: Mon Jun 13, 2016 11:23 am

Keyboard selection of elements in Author mode is odd; what am I doing wrong?

Post by Graham Hannington »

I have just started using Oxygen (17.1, on Windows 10) to edit DITA. I have used several other validating XML editors, including Arbortext.

Oxygen's keyboard-based edit selection behavior in Author mode strikes me as odd. This makes me think that I'm doing something wrong; or at least, missing something.

For example, I want to select the <section> element in the following DITA snippet:

Code: Select all


<conbody>
<section><title>My concept</title>
<p><keyword>TLA</keyword> ... </p>
</section>
</conbody>
I expected, in Author mode, that if I moved the insertion point just before the <section> start tag, and then pressed Shift + right arrow, Oxygen would select the <section> element. Nope. It only selects - or rather, it only highlights (there's a difference, as we'll see) - the <section> start tag. Pressing Shift + right arrow again expands the highlighting (I'm deliberately not using the word "selection" here) to include the <title> start tag.

I was, frankly, a little shocked. Based on my experience with other editors - not just XML editors - there is typically a close correspondence between what is highlighted and what is selected (what gets copied'n'pasted). According to the highlighting shown in the editor, I had selected two consecutive start tags. What had I selected in terms of the XML tree?

Copying and pasting to a new DITA document gave me the answer:

Code: Select all


<section><title>My concept</title></section>
It's starting to dawn on me that I need to unlearn some of my expectations. As demonstrated above, in Oxygen, what is highlighted does not directly match what is selected. I sincerely mean no offense by that statement, but I do mean to provoke a response. Perhaps, in time, I will learn to love this behavior. But right now, it strikes me as odd, even counterintuitive. And I thought it was worth capturing that "newbie" reaction here, even if I later recant.

I realize that I can mouse-click the <section> start tag to select the element. Is there some way to do this with the keyboard, without defining a shortcut key for the Document > Select > Element menu option? I've defined such a shortcut, but I'm still in denial about having to do that; I still suspect I'm missing something; doing something wrong.

I'd appreciate thoughts and suggestions from experienced Oxygen users.

(Note: these comments are specifically restricted to Author mode.)

Graham Hannington
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Keyboard selection of elements in Author mode is odd; what am I doing wrong?

Post by Radu »

Dear Graham,

Thanks for the feedback, I understand what you mean.
Indeed in the Oxygen Author visual editing mode (and it has always been like this) whenever you select the start tag (or end tag) of an element, the selection will not auto expand to also contain the entire element. So whenever you copy in Oxygen content which would not be well-formed in itself, in the clipboard Oxygen will automatically close the end tags for the selection so that it becomes well-formed.
We considered this to be closer to what office applications do.
In this way if you want to create a new section containing only the title from the current section you can do that without needing to delete extra content after this.
Also if you want to copy only part of a paragraph you can select the start tag and part of the content, copy and you have a paragraph containing the partial text that you can paste.

I do realize that in doing this Oxygen behaves differently than any other XML Editor which has a visual editing mode but you might grow to enjoy this eventually.
I also added an internal issue and based on feedback we might be able in the future to provide a setting to select entire elements when the start or end tags are selected.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Graham Hannington
Posts: 48
Joined: Mon Jun 13, 2016 11:23 am

Re: Keyboard selection of elements in Author mode is odd; what am I doing wrong?

Post by Graham Hannington »

Hi Ranu,

Thank you for your clear and concise explanation of this behavior, including the rationale and use cases. All of that makes sense, and is very helpful. Where previously I was mystified, and thought that perhaps I was doing something wrong, or - I didn't mention it in my previous post, but it did occur to me - that this behavior was the result of a bug, I now understand that this behavior is by design, and why.

Just a thought: would you consider adding that explanation, or some verson of it, to the Oxygen help: for example, in or nearby "Author Editing XML Documents > Editing XML Documents in Author Mode > Editing the XML Markup"? (There's also "Editing Modes > Author Editing Mode > Author Mode Editor > Navigating the Document Content in Author Mode > Using The Keyboard", but the former location might be more appropriate.)

Re:
based on feedback we might be able in the future to provide a setting to select entire elements when the start or end tags are selected.
Thank you. Yes, I would use that setting.

You mention that your decision to provide such a setting would be based on feedback. So, for what it's worth, I thought I'd provide some more context to my feedback. I mentioned that I have only just started using Oxygen to edit DITA: specifically, user documentation for an IBM-brand software product. However, while I'm an Oxygen newbie, I have some experience editing XML and other markup. My first experience writing IBM product documentation was in the late 80s, using XEDIT on VM/CMS via an IBM 3270 ("mainframe") terminal to edit IBM BookMaster GML. Later, I used Arbortext (back when it was Epic) to edit IBMIDDoc SGML and, more recently, DITA. I've also used other validating XML editors, including jEdit (with a plugin to validate XML) and XMLSpy (mostly to develop XML schemas and XSLT style sheets rather than documentation). The flipside of this experience is that I might be accused of being hidebound, with inflexible expectations. But I try to remain conscious of that, and stave off senescence by, for example, ranting against Markdown, in Markdown :wink:.

Regards,
Graham

P.S. You mentioned office applications. I have some thoughts about how, while the source format of MS Word is now XML, the structure of that XML - at least, as far as the document content is concerned - is hobbled by the serial (not treelike) nature of the previous format (RTF). But that's probably a topic for another thread in another forum.
Last edited by Graham Hannington on Tue Jun 14, 2016 12:18 pm, edited 1 time in total.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Keyboard selection of elements in Author mode is odd; what am I doing wrong?

Post by Radu »

Hi Graham,
Just a thought: would you consider adding that explanation, or some verson of it, to the Oxygen help: for example, in or nearby "Author Editing XML Documents > Editing XML Documents in Author Mode > Editing the XML Markup"? (There's also "Editing Modes > Author Editing Mode > Author Mode Editor > Navigating the Document Content in Author Mode > Using The Keyboard", but the former location might be more appropriate.)
Yes. We'll try to improve our user's manual to include an explanation for this.
However, while I'm an Oxygen newbie, I have some experience editing XML and other markup. My first experience writing IBM product documentation was in the late 80s, using XEDIT on VM/CMS via an IBM 3270 ("mainframe") terminal to edit IBM BookMaster GML. Later, I used Arbortext (back when it was Epic) to edit IBMIDDoc SGML and, more recently, DITA. I've also used other validating XML editors, including jEdit (with a plugin to validate XML) and XMLSpy (mostly to develop XML schemas and XSLT style sheets rather than documentation).
Impressive, hopefully you'll grow to like Oxygen. If you have any other suggestions about Oxygen, they are welcomed.
P.S. You mentioned office applications. I have some thoughts about how, while the source format of MS Word is now XML, the structure of that XML - at least, as far as the document content is concerned - is hobbled by the serial (not treelike) nature of the previous format (PTF). But that's probably a topic for another thread in another forum.
I agree. That serialized Word XML looks awful probably because it tries to express the extraordinary structure-less flexibility people have when editing word documents.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Graham Hannington
Posts: 48
Joined: Mon Jun 13, 2016 11:23 am

Re: Keyboard selection of elements in Author mode is odd; what am I doing wrong?

Post by Graham Hannington »

A follow up, for what it's worth (again, just logging my thoughts and actions as a newbie Oxygen user): I have defined the following keyboard shortcuts in the Selection category, corresponding to the Document > Select menu options listed previously:
  • Content: Ctrl+Alt+C
  • Element: Ctrl+Alt+E
  • Parent: Ctrl+Alt+P
Some of these override built-in shortcuts; happily, not ones I would typically use, or would choose in preference to these selection shortcuts.

I'd still prefer the selection method I'm used to from other editors, but, with these keyboard shortcuts, I'm now more productive in Oxygen than I was.
Post Reply