Tom Moore wrote:
> 
> I am just trying out XXE so I am a real newbie on things.
> I have a book written in DocBook that so far I have put together by
> editing in Emacs.  I have organized the source for my book into
> chapters.  The master document has entity declarations for each chapter,
> and then includes each chapter as entity references.
> 
> At the bottom of each chapter source file I have a few lines of emacs
> local variable declarations that look something like this:
> <!--
> Local Variables:
> sgml-parent-document:("UserGuide.db" "book" "chapter")
> sgml-always-quote-attributes:t
> sgml-indent-step:2
> sgml-indent-data:t
> End:
> -->
> These are the last lines in the file.
> It appears as though the XXE parses this comment as being part of the
> parent document, and then declines to treat the content as modular. 
> When I open the 'master' document, the parser informs me that the
> document contains references that are not managed by XXE, and the
> references will be replaced by their contents.  If I remove the comment
> then the XXE parser will then state that the references will be managed
> by XXE.
> 
> I guess that this is 'correct behaviour', but it confused me for a while
> until I figured it out.  I just thought I would mention it in case
> someone else has a similar confusion.
> 

XXE has very limited support for references to external entities. It
behaves as described here:
http://www.xmlmind.com/xmleditor/_distrib/doc/help/com.xmlmind.xmleditapp.dialog.PreferencesEditorDialog.html#managed_non_managed


In a nutshell, for a reference to an external entity to be ``managed''
by XXE, the external entity must contain an element and nothing, really,
really *nothing* else.

You would have had no trouble at all if instead of building your master
document by hand, you had built it using XXE. In such case, XXE would
have automatically used XInclude instead of references to external entities.

This is explained here:
http://www.xmlmind.com/xmleditor/_distrib/doc/user/tutorial_modular_document.html


Reply via email to