Davy Toch wrote:
> 
> I like XXE very much but there's only one feature that bugs me
> when editing DocBook modular documents with source fragments
> included in it using XInclude/parse="text", as shown here:
> 
>  <programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude";
>    href="examples/src/main/java/comp/Person.java" parse="text">
>    <xi:fallback>!!! NOT FOUND !!!</xi:fallback>
>  </xi:include></programlisting>
> 
> Once you edit and save whichever section of your DocBook document, then the
> XIncludes pointing to the source fragments are replaced by the actual
> source fragments.
> 
> A simple solution would be to have an option in XXE "Show
> XInclude/parse=text
> fragments as hyperlinks", so that inside XXE you won't be able to see the
> source fragment. Instead you will be able to click on the link
> 'examples/src/main/java/comp/Person.java' in order to open it with a
> separate
> text editor (Notepad, VIM, ...). As a consequence I don't think
> the XIncludes will have to be replaced by the actual code fragments
> once the DocBook is modified and saved.

What you suggest certainly makes sense. The problem is that currently,
for XXE, <xi:include> elements (like managed references to external
entities and namespace prefixes) only exist at document load time and at
document save time.

Remember that XXE does not suppport XIncludes per se. For XXE, XIncludes
are just a tool used transparently for the user to create modular documents.

Here's what could be implemented (if other users are interested):
[1] Turn on option (to be implemented) "Do not transclude <xi:include>
elements".
[2] Use a schema where <xi:include> elements have been declared as first
class elements (e.g.  docbookxi.rng).
[3] The configuration associated to such schema should declare
"//xi:include/@href" as a resource of the document being edited.


Reply via email to