This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] XSL & DocBook Question
- From: "Bob Stayton" <bobs at sagehill dot net>
- To: <docbook-apps at lists dot oasis-open dot org>, "Tristan Fiedler" <fiedler at cshl dot edu>
- Date: Wed, 24 Nov 2004 01:09:32 -0800
- Subject: Re: [docbook-apps] XSL & DocBook Question
- References: <C55ABD04-3D75-11D9-9A66-000D933B5D9E@cshl.edu>
The difference is that not all templates recursively use apply-templates on
all children. Some template bodies apply-templates to selected children.
In the case of inlinemediaobject (and mediaobject), using apply-templates on
all children would be a mistake, because a mediaobject can contain several
images, only one of which is selected for output. So the template for
inlinemediaobject first selects a single imageobject, and then does
apply-templates only on that.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
----- Original Message -----
From: "Tristan Fiedler" <fiedler@cshl.edu>
To: <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, November 23, 2004 9:33 AM
Subject: [docbook-apps] XSL & DocBook Question
> When I customize the docbook.xsl file to include :
>
> <xsl:template match="gene|sentence|organism|cjunction|kitty">
> <xsl:apply-templates/>
> </xsl:template>
>
> Why does the following properly render the 0.5 cm image, but the second
> example below does not? It seems that the 'apply templates in the
> docbook.xsl file should make both identical?
>
> ******************************************* This works
> ****************************************
>
> <xref linkend="figure1"/>
> <kitty>
> <link linkend="figure1">
> <inlinemediaobject>
>
> <imageobject>
> <imagedata entityref="fig1" depth="0.5cm"/>
> </imageobject>
>
>
> </inlinemediaobject>
> </link>
> </kitty>
>
>
>
> ******************************************* This Does Not Work
> ****************************************
>
> <xref linkend="figure1"/>
> <link linkend="figure1">
> <inlinemediaobject>
> <kitty>
>
> <imageobject>
> <imagedata entityref="fig1" depth="0.5cm"/>
> </imageobject>
> </kitty>
>
>
> </inlinemediaobject>
> </link>
>
>
>
>
> Cheers,
>
> Tristan
> ------------------------------
> Tristan J. Fiedler
> Postdoctoral Fellow - Stein Lab
> Cold Spring Harbor Laboratory
>
>
>