Paul Moloney wrote:
>> For now, the best we can do, which is elegant, maintenable, easy to use
>> and separates content from style, is described here:
>> http://www.xmlmind.com/xmleditor/_distrib/doc/user/tutorial_modular_document.html#extensive_copy_as_reference
>>
>> (But may be in your case, this is not relevant.)
> 
> I found this variable add-on from techwriter.dk:
> 
> http://techwriter.dk/tools/xxe/glosstool.html
> 
> Easy to use, but it doesn't universally work; for example, I can't
> create a variable
> for "publication date" and insert it in the <pubdate> element: I get a
> "Document
> reference command is not allowed in this context" error, presumably
> because the
> element referenced is a <glossterm>.

Yes.



> (Although I CAN edit the XML in a text editor, insert the required
> markup, and reopen
> the file in XMLMind without error; for example)
> 
>      <pubdate>
>            <xi:include href="../common/variables.xml"
>            xmlns:xi="http://www.w3.org/2001/XInclude";
>          xpointer="myterms.pubdate" />
>      </pubdate>
> 
> And even then, the resulting text is a glossterm and so styled differently
> (with italics) from the surrounding text. So, really not much good.

Even, here at XMLmind, where we are all software engineers, my
colleagues could do what you did to save their lives: they don't know
what is an xi:include!



> It looks like we'll have to go the copy-as-reference route, though I had
> negative feedback when I demoed this method here at work.
> 
> I guess I'm just very surprised that as yet, there seems to be no easy
> way of maintaining variables in DocBook files. It didn't even occur to me
> to check was this possible before we moved from Word to DocBook.

Copy as reference has been designed to be used for including phrases (or
any other fine-grained element, like pubdate) as well as for including
chapters and sections.

We really don't see what's wrong with this way of doing things:

* It is conceptually simple: just copy a reference to an element having
an ID and paste it in another document.

* It is safe: paste will not allow you to do it at wrong places. The
Paste icon is disabled in such case.

* It is structured. You copy a phrase from a *documented*, shared,
snippets.xml. That is, next to the phrase you copy, you have its
documentation.

* It is convenient:
- copy as reference works on already included elements. This makes it
easy duplicating a reference in the same document.
- cut has been reference-enabled recently. This makes it easy to move a
reference.

Now, having said this, please tell us what kind of UI you expect from
such facility. You don't like what we did and you don't like what did
Claus, so I'm really curious. If you come up with a great idea, we'll
implement it (but remember that XXE can only include elements, not text).

Reply via email to