Hi Robert,
First let me point out that the @annotates attribute is optional, and just one way of associating an annotation element with its subject matter. In your case, you don't want to associate via id reference. So putting an annotation element inside an info element in the chapter will be your way of associating the annotation with the chapter, simply by context.

That info context also provides a means for generating the output at the start of the chapter. An element inside <info> is not necessarily displayed in the output. The DocBook XSL titlepage spec file controls which info elements are output, in what order, and to some degree with what format. In your case, you customize the spec file so it will output your annotation:

<t:titlepage t:element="chapter" t:wrapper="div" class="titlepage">
 <t:titlepage-content t:side="recto">
   <title/>
   <subtitle/>
   <annotation t:predicate="[...@role = 'chaptersummary']"/>
 </t:titlepage-content>
 ...

Adding <annotation> will cause the stylesheet to xsl:apply-templates to the annotation element, and adding t:predicate ensures only that particular annotation is selected.

You then compile the titlepage spec file into a stylesheet module, and xsl:import that module into your customization, as described here:

http://www.sagehill.net/docbookxsl/HTMLTitlePage.html

Then you will need to write your template to respond to the xsl:apply-templates, as the default annotation template is empty.

<xsl:template match="annotati...@role = 'chaptersummary']">
 <!-- Do what you need to here in order to format the annotation -->
 <xsl:apply-templates/>
</xsl:template>

Let me know if this isn't enough information.

Bob Stayton
Sagehill Enterprises
[email protected]


----- Original Message ----- From: "Robert Nagle" <[email protected]>
To: <[email protected]>
Sent: Wednesday, July 01, 2009 3:32 AM
Subject: [docbook-apps] abstract for each chapter? bio page for authors to anthology?


Thanks. By the way, I noticed that in version 5.0 authorblurb was
changed to <personblurb>

Re: my question about  chapter summary/abstract: I see info -->
annotations as a solution. However, it looks like annotations are not
processed by default. I need them to appear at the top of each chapter
and also on a separate  chaptersummarytable.html

Bob Staynton provides an example of how to write an xsl customization
for annotation to process them. But I'm not sure it is applicable to
my case.
http://www.sagehill.net/docbookxsl/CustomDb5Xsl.html#AnnotationCustomization

In particular, I'm curious about the annotations in the sample code
and what I'd want to use.
<chapter>
<info>
<annotation annotates="intro" role="instructor.note"> This is an
annotation</annotation>
</info>
<para xml:id="intro">This chapter introduces ...


Every chapter is going to have a chaptersummary, so would I say
role="chaptersummary"? (annotates seems to be to a specific unique id,
but that wouldn't work because each chapter would need to have a
unique ID).

I need annotations to be printed in two different places:
 1. as a formatted paragraph at the top of the  chapter when processed.
 2. as a separate page/html file consisting of a 2 column chart
(chaptertitle, annotation.chaptersummary).

I haven't made an XSL template yet (this is my first time), but 2)
seems to be pretty straightforward. I'm not so sure about 1).  I'm
using an custom.xsl as a customization layer for the docbook xsl which
contains custom parameter values. First line is this:
  <xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/epub/docbook.xsl"/>

I assume I need to do something like <xsl:template match="annotation"
where the role = chaptersummary. But how would you make make this
chaptersummary paragraph appear in the chunked html output? I'm
stumped .  What would I need to do: use a different import statement
on my custom.xsl than what I already have? Or would I need to go into
the relevant .xsl file and insert the xsl: template match in the
appropriate context in the file?

Thanks.

Robert Nagle

---------------------------------------------------------------------
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]

Reply via email to