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] Adding an icon to each defined <term>


This is an alternative approach. I was in a similar situation where the
users wanted checklists. Rather than customize the fo and html xslts, I
added a preprocessing step that converted <itemizedlist
role="checklist"> into something like this:

  <variablelist>
	<?dbfo list-presentation="list"?>
	<?dbfo term-width=".25in"?>
	<?dbhtml list-presentation="table"?>
	<?dbhtml term-width=".25in"?> 
	<title>Understand the Device Manager environment</title> 
	<varlistentry>
	  <term>
		<inlinemediaobject>
                 <imageobject>
                    <imagedata fileref="./common/checkbox.gif"/>
                 </imageobject>
            </inlinemediaobject>
        </term>
	  <listitem> 
		<para>Understand the main deployment types. </para> 
	  </listitem>
	</varlistentry>  
....

So the existing fo and html xslts work as-is. However, you do have to
add the preprocessing step to your build that converts the itemizedlist
to the variablelist, adds the inlinemediaobjects, the Pis, etc. In your
case, that step might do the autonumbering as well.

David

> -----Original Message-----
> From: Halm Reusser [mailto:halm.reusser@switch.ch] 
> Sent: Monday, November 10, 2008 8:12 AM
> To: docbook@lists.oasis-open.org
> Subject: [docbook] Adding an icon to each defined <term>
> 
> Hello together,
> 
> I have this docbook snippets:
> 
>         <variablelist>
>           <varlistentry role="REQ">
>           <term>REQ-</term>
>           <listitem>
>             <para>This is an example requirement.</para>
>           </listitem>
>          </varlistentry>
> 
>           <varlistentry role='REC'>
>           <term>REC-</term>
>           <listitem>
>             <para>This is an example recommendation.</para>
>           </listitem>
>         </varlistentry>
>       </variablelist>
> 
> 
> With the perfect help of Bob Stayton, I get it worked, that 
> all REQs and RECs are auto numbered for the whole document.
> 
> Now, I'm trying to add an icon before each REQ-xxx and 
> REC-xxx. I have this xsl:
> 
> <xsl:template match="varlistentry/term">  <fo:inline>
>    <xsl:call-template name="simple.xlink">
>      <xsl:with-param name="content">
>        <xsl:choose>
>          <xsl:when test="parent::varlistentry/@role = 'REQ'">
>          <fo:external-graphic 
> src="url(proc/docbook-xsl/images/note.svg)"
>             content-width="10pt" width="10pt"/>
> 
>           <xsl:text>REQ-</xsl:text>
>           ...
>  
> This works for my FO output, but it looks nasty...
> 
> The second thing is, I wanna defined in a way, that it works 
> also for the HTML output.
> Is there are general way to do it?
> 
> If not:
> I have an 3-level customization layer:
> 
>                         My-FO.xsl   My-HTML.xsl
>                          ^     ^     ^       ^
>                          |     |     |       |
>  docbook-xsl/fo/docbook.xsl    |     |      
> docbook-xsl/html/onechunk.xsl
>                                |     |
>                             My-COMMON.xsl
> 
> 
>  Who can I say, in My-FO.xsl to get all merge templates from 
> My-COMMON.xsl instead of repalcing.
> 
> 
> Thanks in advance,
> 
> Halm
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-help@lists.oasis-open.org
> 
> 


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