Kevin Flynn wrote:
> However, my problem isn't really to do with how to edit xinclude
> elements, more to do with how XXE handles them - I think I wasn't very
> clear.
>
> Suppose I have an XML file, foo.xml, containing
>
> <foo/>
>
> that I want to include in my document as an example. I edit my document
> (using an external text editor, say) so that it contains:
>
> <programlisting>
> <xi:include href="foo.xml" parse="text"/>
> </programlisting>
>
>
> When I next open the document in XXE, I get a warning telling me that my
> document contains an unmanaged inclusion that will be absorbed into the
> document. The file content is rendered the way I want, it's just not an
> inclusion any more.
>
> What I'm looking for is a workaround that will let me include code
> examples in my documents in a managed way.
You were clear. Currently the only way to do serious work with
<xi:include parse="text"/>
is to prevent XXE from transcluding all <xi:include> elements.
Now, for the above case, I personally use the <textdata fileref="XXX"/>
DocBook element. This sure doesn't let me see the contents of "foo.xml"
in the document being edited, but the DocBook XSL style sheets work as
expected when this document is converted to other formats.
Example:
<programlisting><textobject>
<textdata fileref="recommended_sections.txt" />
</textobject></programlisting>
See http://www.docbook.org/tdg5/en/html/textdata.html
> Incidentally, I would also like to know what the regression you mention
> above will be (I don't want to rely on functionality that is going to
> disappear...)
>
"File|Save As", which currently also copies all the resources (graphics,
inclusions, etc) referenced in a document along with document, will no
longer do so in XXE v4.
This should be compensated by the fact that XXE v4.1 or v4.2 will have
an advanced file manager (will support local and remote file systems).