Johan Persson wrote:
> 
> I'm looking into buying your professional version but before this there is 
> one 
> thing I must make sure I can do.
> 
> I'm writing documentation for a large program library and for that purpose I 
> need to include a lot of source examples. For this I use
> 
> <programlisting language="c">
> <xi:include href="examples/cexample01.c" parse="text" />
> </programlisting>
> 
> when I manually write XML/DocBook
> 
> However while xmlmind can correctly parse this type of XML there seems to be 
> no 
> way to create or actually edit this kind of XML from your editor. There seems 
> to 
> be no way of actually getting hold of the <xi:include> details.

If you just want to ``see'' the xi:include details, please select
"View|Show info about included elements".

For your parse="text" problem, see below.




> 
> Since the referenced file is not proper XML it cannot be inserted as 
> reference 
> from within the editor either (editor->reference).
> 
> Is there any way to manage this from within the editor way ? (or perhaps some 
> workaround)

There is currently no easy-to-use facility to do this. We could add one
in the future if there is sufficient demand.

The workaround is:

[1] Insert a reference to an element into the programlisting (anything
will do: it is just a placeholder).

[2] Select the included element and use "Edit|Reference|Untransclude
Reference"
(http://www.xmlmind.com/xmleditor/_distrib/doc/help/editMenu.html#referenceMenu).


By doing this you'll replace the included placeholder element by the
corresponding xi:include.

[3] Use the attribute tool to add the proper href and parse="text"
attributes to the xi:include element.

[4] Finally use "Edit|Reference|Retransclude Reference"
(http://www.xmlmind.com/xmleditor/_distrib/doc/help/editMenu.html#referenceMenu)
to replace the xi:include element by the included text.



> 
> (I guess I could create some custom code in the programlisting tag that gets 
> replaced in a post-processing step to the necessary <xi:include> tag.)
> 

See also DocBook elements textobject/textdata
(http://www.docbook.org/tdg/en/html/textobject.html) which are an
alternative to xi:include parse="text"

Reply via email to