Re: RFE Edit embedded document

Hussein Shafie <[email protected]> Mon, 28 Nov 2022 09:35:33 +0100
Newsgroups gmane.editors.xxe.general
Message-ID <[email protected]>
On 11/26/22 17:21, Leif H Silli wrote:
> When I work with XMLmind XML editor, I almost always work with compound 
> documents with Xinclude includes.
> 
> The structur of our documents tend to look like this:
> 
> Book-document (which embeds)
>    Chapter 1-document (which embeds)
>        Section 1 of Chapter 1-document
>        Section 2 of Chapter 1-document
>    Chapter 2-document (which embeds)
>        Section 1 of Chapter 2-document
>        Section 2 of Chapter 2-document
>    [ … etc …]
> 
> Example issue description:
> 
> 0) I open the Book-document and find something to edit in Section 2 of 
> Chapter 1
> 
> 1) XXE allows me to Ctrl-Click that section, so that I get a Ctrl-Click 
> menu from where I can selct the submenu “Edit Referenced Document” .
> 
> 2) The very text of the above Ctrl-Click menu implies that when the 
> referenced document gets opened, I shall immediate be able to edit 
> Section 2 of Chapter 1-document.
> 
>    ** (Note: One may say that there are actually - in this case - two 
> referenced documents: The Chapter 1-document as well as the Section 2 of 
> Chapter 1-document. However, since the mouse pointer actually points to 
> a par of the Section 2 of Chapter 1-document, it seems naturally to 
> think that that is the document that is referenced) **
> 
> 3) But instead, what happens is that the parent document – the Chapter 
> 1-document – gets opened.
> 
> 4) This means that in order to edit the Section 2 of Chapter 1-document, 
> I must now repeat step «1)» on the Chapter 1-document: I must point to 
> the Section 1 of Chapter 1-document and select “Edit referenced document”.
> 
>     ** (NOTE: If I had a subsection document, I would have had to 
> repeated step 1) yet another time.) **
> 
> Conclusion:
> 
> I find the current two-steps solution behavior tedious and confusing. 
> For instance, the book I work on right now, have near 20 chapters, of 
> which almost every chapter has several sections. Each time I want to 
> edit such a section, I must perform the two steps described above.
> 
> Proposal:
> 
> I suggest instead a one-step solution: when one points to a part that is 
> embedded in another document that is also embedded, then it is the 
> innermost embedded document - the exact part that you are pointing to – 
> that should become opened.
> 
> 

We 100% agree that implementing your RFE would improve XXE but 
unfortunately this is not easy to achieve.

Making "Edit Referenced Document" directly open, say, section 2 of 
chapter 2 (rather than chapter 2, which is the current behavior) would 
be quite easy to implement.

But "Edit Referenced Document" does not just open the included document. 
It also "transfers" what's selected in the including document to the 
included document and then scrolls the included document to let you see 
this selection.

For example, let's say you select text "This is explained below." in the 
book and this sentence is found in section 2 itself included in chapter 2.

"Edit Referenced Document" currently opens chapter 2 and selects/scrolls 
text "This is explained below." in the chapter.

We took a long look at the code and it's technically quite difficult to 
directly open  section 2 instead and select/scroll text "This is 
explained below." in the section.

Moreover implementing your RFE also requires changing the "Edit 
Referencing Document" command accordingly, with similar technical 
difficulties. See 
http://www.xmlmind.com/xmleditor/_distrib/doc/help/referenceMenu.html#editIncludingAction

Therefore, sorry, but we'll not implement the useful behavior you have 
suggested.

(May be using the keyboard shortcut Cmd+Shift-E twice in a row rather 
than selecting the "Edit Referenced Document" entry of the contextual 
menu would make it easier opening the section of the book.)



--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support