Jirka Kosek wrote:
> Hussein Shafie wrote:
> 
>>Wrap your ``XML variables'' in HTML span or DocBook phrase elements.
>>Give each variable a unique ID. Declare and *document* these variables
>>in a companion ``glossary document''. Then simply "Copy as Reference" an
>>``XML variables'' from the ``glossary document'' and Paste it in the
>>document you are editing.
> 
> Hi Hussein, I think that it would be really plus for users if XXE could
> provide more convenient UI for users who need to insert a lot of such
> references. What about adding command like "Insert reference" which will
> scan all XIncluded files that are refereced using XPointer (so only part
> of them is included, not a whole document) and then offer all IDs found
> in those files as a list. This way, insertion of "entities" could be
> much more faster then switching between master and "glossary" document.
> 

--> Initially, building modular documents was done using the "include"
command (which slightly resembles what you describe):
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/include.html

This command proved to be both tedious to use and also very hard to use.

Example:

* You pick element with ID="foo" from bar.xml and want to insert it
inside current <para> at caret position.
* This is refused by command "include" because element with ID="foo" is
itself a <para>.
* The user who thought its was a <phrase> is puzzled and thinks XXE is
broken.

Give it a try (e.g. "Esc x include"), you'll hate it.

We have kept this command because it may be useful when used non
interactively in macros.

For us, this has showed that building modular documents must be
performed using the "Copy reference/Paste" paradigm because *Paste* *is*
*safe*: this command shows you where you may paste the reference and
when you may not do that.



--> Switching between master and glossary documents is tedious, that's
right, but:

[1] Once a reference is already inserted in the master document you can
copy and cut it normally. That is, copy, cut, paste preserve inclusions.

[2] You can put the master and glossary documents side by side,
horizontally or vertically: suffice to click on the dashed line found in
the tab containing the name of the document being edited.

--> An alternative which we may implement (because it should be easy to
do so), is to add a new tool (i.e. like the Edit tool, the Attribute
tool, the Search/Replace tool, etc).

This tool would allow you to select one or more glossary documents and
would list all elements having an ID, showing info about them.

Picking an element from this list (autocompletion) would automatically
``Copy it as a reference''. After that, suffice to Paste it, Paste it
before or Paste it after.

What do you think about this: that is, your idea but implemented
differently?



--> See also: http://techwriter.dk/tools/xxe/glosstool.html which is
interesting, but, personally, I don't like using dialog boxes.

Reply via email to