--> Thank your for your feedback, which is, as always, very interesting.
First of all, we basically agree about the usefulness of XInclude for
XHTML v1, v1.1 or v5 and with the fact that XInclude support is not tied
to the presence of a DTD.
We are also very conscious of the importance of XHTML5 as a source
format for structured documents. That's why we are currently working
very hard to make our XHTML5 support (schema, CSS, XSL) compliant with
newly released HTML5 spec:
HTML5 A vocabulary and associated APIs for HTML and XHTML
W3C Recommendation 28 October 2014
For all these reasons, we'll probably restore the support of XInclude in
all the XHTML configurations in the near future. (Sorry to be so vague
but this depends on the success of the implementation of other features.)
--> Now, a few facts about XMLmind XML Editor v6+:
* Restoring XInclude in the XHTML v1 and v1.1 configurations is simply a
matter of uncommenting:
<!--
<inclusionScheme name="XInclude">
<class>com.xmlmind.xml.xinclude.XIncludeScheme</class>
</inclusionScheme>
-->
in <XXE_install_dir>/addon/config/xhtml/xhtml1_support_base.incl
This will work fine because in XHTML v1 and v1.1 attribute id has a
(DTD) ID type[1].
* The id attribute of XHTML v1, v1.1 or v5 is called "id", not "xml:id".
Using "xml:id" instead of "id" means creating invalid documents. (Yes,
you never suggested to use "xml:id", but this is just to stress the fact
that the XHTML5 spec is not related at all to the xml:id spec.)
* The id attribute of XHTML v5 definitely does *not* have a (DTD) ID
type[1] or a (XML Schema/RELAX NG) xsd:ID type[2].
Why that? Answer: it's value is not an XML NCName. It may contain any
character, but space characters. For example "123" is a valid XHTML5 id[3].
* This could be a problem to support the XPointer element() Scheme[4],
but not really to support the XPointer xpointer() Scheme[5].
* XMLmind XML Editor supports the XPointer xpointer() Scheme (to a
certain extent) provided that you turn on the "Allow advanced use of
XInclude" option[6] (Menu item "Options|Preferences", "Edit" section in
the dialog box; this option is off by default).
References:
[1] http://www.w3.org/TR/xml/#id
[2] http://www.w3.org/TR/xmlschema-2/#ID
[3] http://www.w3.org/TR/html/dom.html#the-id-attribute
[4] http://www.w3.org/TR/xptr-element/
[5] http://www.w3.org/TR/xptr-xpointer/
[6] http://www.xmlmind.com/xmleditor/_distrib/doc/help/editOptions.html
On 12/07/2014 11:31 PM, Leif Halvard Silli (russisk.no) wrote:
Regarding XInclude, then - for some reason - support in XHTML 1.x
documents is disabled by default. However it is simple to enable, as
described in the release notes for XMLmind XMLeditor version 5.2.[1]
When enabled, it seems like the editor only support simple
inclusion/refernce. That is: the “XPointer element() scheme” is not
supported. Hence, it is only possible to copy references for which there
already is a conforming id attribute.
But for XHTML5 documents, the same release notes states that XHTML5
doesn’t really support XInclude, only to add, in a parenthesis, “(well,
at least, the XPointer element() scheme)”. [1]
Why is that?
Why not support the same simple refence that works in XHTML 1.x
documents. The lack of a XHTML5 dtd should not matter. Because HTML5
spec says that the id attribute is of type ID.[3] Thus XML processors
really SHOULD assign ID type to HTML5’s id attribute. As well, the
specification of ‘xml:id version 1.0’ states that it is really up to the
application how it performs ID type assignment,[4] and it seems
reasonable to think the same way about “IDness” for id in XHTML5 documents.
For xml:id there is no real link between XML validation and ID type
assignment. By contrast, in XMLmind XMLeditor there *is*, it seems, a
link between validating the document according to DTD and ID type
assignement - which is OK, I guess, for XHTML 1.x documents. But it
seems that id in XHTML5 documents should be more or less handled the
same way that xml:id is treated in e.g. DocBooc - it should not be tied
to DTD but should rather be linked to the namespace.
* [1] http://www.xmlmind.com/xmleditor/changes.html#v5.2.0
* [2] http://www.xmlmind.com/xmleditor/_tutorial/modular_doc/index.html
* [3] https://html.spec.whatwg.org/multipage/dom.html#the-id-attribute
* [4] http://www.w3.org/TR/xml-id/#dt-id-assignment -- leif halvard silli
On 12/07/2014 04:48 PM, Leif Halvard Silli (russisk.no) wrote:
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
to make XInclude the (default) embedding function in any document (except
in DITA documents).
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.)
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:
Simple previewing of/working with multifile 'books' in XHTML format.
Simple conversion to ePUB 3.
Simple conversion to "flattened" XHTML files (where the included files have
been made part of the 'mother document').
A good editor for working with tools such as Prince XML (a PDF-formatter
with built-in support for XInclude).
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