Excuse me to insist on this, but we really, really, don't want you to loose your time with our product:

--> If you are really used to work successfully with <xref xlink:href="#foo">, which seems to be the case given what you wrote below, then our product will get in the way. In such case, we strongly recommend that you consider using another DocBook editor. <--

Detailed explanations below.




On 11/14/2016 02:17 PM, Vincent Bossier wrote:

There is one difference though: <xref xlink:href="#foo"> allows cross-
referencing across different files. I use typically this when I work on a large
document and store each chapter in a dedicated file.


I'm sorry but I don't understand what you wrote.

To my knowledge, xlink:href="#foo" precisely means "link to foo" where anchor "foo" is found in this file (just like with HTML). While linkend="foo" means "link to foo" wherever anchor "foo" may be.

And something <xref xlink:href="other_docbook_chapter.xml#bar">, while theoretically sound, is useless in the case of DocBook.

With DocBook 4, 5 and 5.1, you typically use:

* Internal links: link, xref with @linkend.

* External links: ulink (DocBook 4) or link xlink:href="AN_EXTERNAL_URL" (DocBook 5+).

* Links between *deliverables* (NOT between the chapters of a book): olink. (There is also a xlink:href variant for olinks, but I don't see why it's better than good old olink.)

With DocBook 4 and 5, modular documents are specified using a master document (e.g. book) x-including a number module documents (e.g. chapter).

With DocBook 5.1, modular documents are specified using assemblies.

In all the above cases of modular documents, internal links specified using @linkend work just fine.




Note that almost all our in-house DocBook documents are modular (each chapter --sometimes sections too-- is stored in a dedicated file) and that XMLmind XML Editor is designed to make it easy and safe working with such modular documents.

Tutorials:

* Creating a modular document: http://www.xmlmind.com/xmleditor/_tutorial/modular_doc/index.html screencast: http://www.xmlmind.com/xmleditor/_tutorial/modular_doc/video/modular_doc.html

* Working with master documents: http://www.xmlmind.com/xmleditor/_tutorial/master_doc/index.html screencast: http://www.xmlmind.com/xmleditor/_tutorial/master_doc/video/master_doc.html

Demo:

<XXE_install_dir>/demo/docbook5-sample.xml








--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to