[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] section element
Hi Mats
If you are using xsltproc to process your XIncludes, you can do
something like this:
<chapter xml:id="foo">
<xi:include href="http://article/to/transclude_1.xml"
xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(//db:article/node())"/>
<section xml:id="bar">
<xi:include href="http://article/to/transclude_2.xml"
xpointer="xmlns(db=http://docbook.org/ns/docbook)
xpointer(//db:article/node())"/>
</section>
</chapter>
The content of the first article is transcluded into a chapter; the
content of the second article is included into a section. This assumes
there's nothing in the articles that is forbidden in their new context.
This is a kludge, I think. It would be cleaner using assemblies.
Simon Dew
Technical Author | Stanley Security Solutions
1 Park Gate Close, Bredbury, Stockport SK6 2SZ, U.K.
Simon.Dew@SBDInc.com | +44 (0) 161 406 3405
www.stanleysecuritysolutions.co.uk
Registered Office: Stanley House, Bramble Road, Swindon
Registered in England and Wales No. 181585 VAT No. 232 2446 95
On 18/11/14 13:48, Mats Broberg wrote:
> Greetings,____
>
> __ __
>
> In DocBook, the “section” element cannot appear directly under “book” or
> “part”, but must have a “chapter” parent. So what to do if a “section”
> is reused (as xincludes) between publications and sometimes must appear
> at the “chapter” level and sometimes at a “section” and even a
> subsection level?____
>
> __ __
>
> “section” is allowed directly under “article”, but “article” seems like
> the wrong element for a 300+ page publication (such as a manual).____
>
> __ __
>
> Best regards,____
>
> Mats
>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]