OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] Including multiple elements


On 3/9/2010 7:47 AM, Remko Tronçon wrote:
> Hi,
>
> Is there a clean way to put multiple elements to include in a document
> into one file?
>
> For example, I have the following toplevel file:
>    <article>
>      <example>[...]</example>
>    </article>
> At the place of the [...], I want to insert a generated
> <programlisting/>  and<calloutlist/>  (which belong together, and
> therefore are generated in one file). I'm currently doing it like
> this:
> <article>
>    <example>
>      <include xmlns="http://www.w3.org/2001/XInclude";
> href="programlisting.xml"
> xpointer="xpointer(//programlisting|//calloutlist)"/>
>    </example>
> </article>
> Where programlisting.xml looks like this:
> <foo>
>    <programlisting>...</programlisting>
>    <calloutlist>...</calloutlist>
> </foo>
>
> The drawbacks are that
> a) The dummy 'foo' element is ugly
> b) this uses xpointer, which not all processors support
>
> I was hoping I could replace<foo/>  by some container element like
> <div/>  in HTML, such that I could xinclude the whole document, but
> there is no such element in DocBook AFAIK.
>
> Is there a cleaner alternative (except for splitting both up into 2 files)?
>
> thanks,
> Remko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-help@lists.oasis-open.org
>
>    
Couldn't you use <example> instead of <foo> and just include the 
example? Or is there some complication I'm missing?


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]