The tutorial for modular documents says: [1] «XMLmind XML Editor allows to include in document B some content found in document A. This feature works by using a special command called Copy As Reference and then by using one of the normal Paste commands.» Same page further it says that «Internally, XMLmind XML Editor uses standard mechanisms, e.g. conref for DITA and XInclude for DocBook».

(Since, confref only works in DITA, consider what I say to not relate to DITA.)

My problem: The feature does not work in XHTML documents as the functionality seems hardcoded to the presence of xmlns="http://docbook.org/ns/docbook"; on the root element. E.g. if one changes the namespace of a <html> element to <html xmlns="http://docbook.org/ns/docbook";>, then the functionality - sort of - becomes available.

My proposal would be

1. to make XInclude the (default) embedding function in *any* document (except in DITA documents). 2. to allow the very ‘Copy as Reference’ to command to function in any file where ID atributes can be found. Or, if not in any file, then at least in XHTML files - note in that regard that per XHTML5, then id attributes are considered to be of type ID - this is specified in the HTML5 spec by reference to the latest version of the DOM specification. (The sensible thing would be to just consider any id attribute to be of type ID, regardless of presence of DTD or schema reference or not.) 3. to allow content to be be included in any XML file (or at least in XHTML files) via <xi:include href="foo" /> or <include xmlns="http://www.w3.org/2001/XInclude"; href="foo" /> (except, again, in DITA documents, where you use the DITA method).

Use cases for supporting XInclude in XHTML that I see and I care for:

1. Simple previewing of/working with multifile 'books' in XHTML format.
2. Simple conversion to ePUB 3.
3. Simple conversion to "flattened" XHTML files (where the included files have been made part of the 'mother document'). 4. A good editor for working with tools such as Prince XML (a PDF-formatter with built-in support for XInclude). 5. Users that would like to embed files can use XHTML instead of first learning DocBook.

* [1] http://www.xmlmind.com/xmleditor/_tutorial/modular_doc/index.html
--
leif halvard silli
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to