Peter Desjardins wrote: > I am trying to use an xi:include element to include the entire content > of an XML file in my DocBook content. The included content is not > DocBook content. I am displaying it in a programlisting element (it is > the subject of my documentation). If I edit the DocBook XML file > outside of XXE, the following xi:include works very well. I publish it > using the DocBook XSLT stylesheets through the Saxon processor. > > <programlisting> > <xi:include href="example-file.xml" > parse="text" > xmlns:xi="http://www.w3.org/2001/XInclude" /> > </programlisting>
Anything you do outside XXE using a text editor implies that the feature is not supported by XXE (I mean: otherwise you would not need to do it outside XXE). > If I try to open the DocBook file (the referencing file) in XXE, it > shows a message warning that the reference is not maintained by XXE and > that it will be replaced by the actual content. I can't replace the > xi:include with the content this way, however I want to use XXE to do > all the rest of my DocBook authoring. > > My questions: > > 1. Can XXE include the contents of an entire XML file in a DocBook > element in a way that it will maintain? XXE maintains other xi:includes > for me and I am happy with those. However, the "copy as reference" > command is not available for the file I need to include. > > 2. Is there any way to configure XXE to ignore the xi:include elements > that it does not maintain? > --> Sorry by XXE does not support XInclude per se. XXE uses XInclude, transparently for the user, in order to build modular documents including *elements* contained in other documents. Please take the time to read http://www.xmlmind.com/xmleditor/_distrib/doc/help/com.xmlmind.xmleditapp.dialog.PreferencesEditorDialog.html#managed_non_managed --> In XXE, the only way to do what you want is to use (besides XIncludes) a non-standard inclusion processor called "The 'GenericInclusion' inclusion processor". More info in http://www.xmlmind.com/xmleditor/_distrib/doc/configure/GenericInclusion_inclusionProcessor.html and in http://www.xmlmind.com/xmleditor/_distrib/doc/commands/genericInclude.html Note that the XML files created using XXE plus the 'GenericInclusion' inclusion processor cause no interchange problems with other XML applications.

