Hi Peter,
Content you want to blend into your output from the assembly file should
be put into a <merge> element like this:
<structure>
<output renderas="article"/>
<merge>
<title>The title of the output</title>
...
</merge>
The <merge> element has a content model like <info>, and is used for
content you want to add or replace in the resource's info element (if it
has one).
In addition to title, an info element is often used to document its
parent element, using revhistory, copyright, legalnotice, etc. While
developing the assembly schema, the authors felt that this function
needed to be retained for assembly elements themselves. So they added a
merge element to separate out any content you want to actually merge
into the resource for output.
I hope I cleared that up.
Bob Stayton
Sagehill Enterprises
[email protected]
On 5/30/2017 2:46 PM, Peter Desjardins wrote:
Hi!
I'm using the new assembly/resource/structure method to construct
books from topic elements. Thank you to everyone who worked on that
feature, it's extremely useful!
I am having trouble getting the titles of books to appear in my
rendered book files.
Based on my reading, I understand that I can include book metadata
such as a title in the structure element. For example:
<structure renderas="book" xml:id="myId">
<info>
<title>My Book Title</title>
<copyright>
<year>2016-2017</year>
<holder>My Company, Inc.</holder>
</copyright>
</info>
<module renderas="chapter" resourceref="myTopicId"/>
</structure>
When I process the assembly, the rendered XML file has the correct
book root element and it includes chapter elements rendered from my
topics. It does not have the book title though.
I see that the assemble.xsl stylesheet explicitly ignores the info and
title for a structure:
https://github.com/docbook/xslt10-stylesheets/blob/master/xsl/assembly/assemble.xsl#L44
Does anyone know how I can supply the title for a structure?
Thanks for your help!
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]