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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] Including contentonly module in a structure, render content sections as chapters?


Hi Peter,
You understand correctly that there is no automatic feature to promote the children of a resourced element during the assembly process. I don't think there could be a default promotion because a book can contain a number of different elements besides chapters, so the stylesheet could not know for sure what element to assign unless it was given some clues.

However, the assembly stylesheet is XSL and could be customized to handle the promotions you want. The mode="copycontent" is used to recursively copy a resource into the assembled element. Because it is a mode, you can add templates that match on your top level sections to rename that element.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

On 9/5/2017 8:32 AM, Peter Desjardins wrote:
Hi! I'm trying to write a DocBook 5.1 topic that I can include in a
very large structure and that I can also publish as a smaller
standalone book.

The topic has nested section elements. To create my standalone book, I
want to include the topic module as the only content in the structure
and promote the topic's top-level sections to chapter elements in the
book.

Here's the structure I'm using:

<structure xml:id="myStandaloneGuide">
   <merge>
     <title>My Standalone Guide</title>
   </merge>

   <module contentonly="true" omittitles="true"
           resourceref="myTopicResourceId"/>
</structure>

This results in a book with my title and the child sections of the
topic, which is almost what I need. The book is not valid because the
sections are not promoted to chapter elements.

Is there any way to include the contents of a topic and promote those
content to book-level elements?

I think I can work around this by creating resources for each of the
child sections and rendering them as chapters individually. I'd like
to confirm that there isn't a feature I'm missing though.

Thanks for your help!

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org





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