On 03/21/2013 09:49 PM, Pierce Tyler wrote:

If I include a section (with an id) more than once in a book--and I use
the 'use.id.as.filename' conversion parameter--in the resulting .html I
get one file that matches the original .xml filename, but the others
have a system-generated name. Example: the original 'section.xml' used
twice in a book becomes 'section.html' and 'section.jaenu.html' in the
.html output.

Looking at the reference "Docbook XSL: The Complete Guide" I see in the
chapter 'Modular DocBook files' that it should be possible to avoid this
situation. Quoting from that book: "Put your second XInclude inside its
own |section| element with a different ID value. And avoid the original
ID value by selecting the children of the |section| element with an
XPointer expression."

My problem is I cannot figure out how to put my second XInclude inside
its own section element (as described) by using the XML Editor
interface. I know there must be a way but I can't seem to figure it out.
Any suggestions appreciated.


--> Use Options|Preferences, Edit section and select "Allow advanced use of XInclude". This is done once for all.

You may want to also check "Warn about advanced use of XInclude" (recommended).

See http://www.xmlmind.com/xmleditor/_distrib/doc/help/editOptions.html



--> [1] Open the document containing the source section element (whose contents is to be included in a target section element).

[2] Select the source section element.

[3] Select all its child nodes using Select|Select All Children (keyboard shortcut: Esc Down_Arrow).

See http://www.xmlmind.com/xmleditor/_distrib/doc/help/selectMenu.html

[4] Use Edit|Reference|Copy as Reference (keyboard shortcut: Ctrl+Shift-C)

See http://www.xmlmind.com/xmleditor/_distrib/doc/help/referenceMenu.html

[5] Open the document containing the target section element. The target section element has an ID which is different from the one of the source section element.

[6] Select all its child nodes as explained in [3].

[7] Use Edit|Paste (keyboard shortcut: Ctrl-V).

Note that this generates standard, though quite avanced, XInclude. Example:

---
<section id="copy">
  <xi:include href=""
    xpointer="xpointer(id('modular_documents')/node())"
    xmlns:xi="http://www.w3.org/2001/XInclude"/>
</section>
---

We doubt that software other than XMLmind XML Editor can cope with this avanced use of XInclude. That is, you'll have to limit yourself to using XMLmind XML Editor (or command-line utility convertdoc) to transform your document to other formats.

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

Reply via email to