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] Request for subtitle of unexpected element: slides (update)


Hi Mathieu,

On Thu, 30 Aug 2012 14:19:14 +0200
Mathieu Malaterre <mathieu.malaterre@gmail.com> wrote:
> 
>   Here is what I did, I simply hacked my local docbook-slides
> installation and added:
> 
> $
> cat /usr/share/xml/docbook/custom/slides/3.4.0/xsl/fo/plain-titlepage.xsl
> [...] <xsl:template match="*" mode="subtitle.markup">
>   <xsl:message>
>     <xsl:text>Request for subtitle of unexpected element: </xsl:text>
>     <xsl:value-of select="local-name(.)"/>
>   </xsl:message>
>     <xsl:value-of select="slidesinfo/subtitle[1]"/>
> </xsl:template>
> [...]

I'm just looking from a stylesheet perspective and the above template
rule seems not entirely correct to me. I'm wondering why you don't make
it more explicit? Something like this:

  <xsl:template match="slidesinfo/subtitle[1]" mode="subtitle.markup">
     <xsl:apply-templates/>
  </xsl:template>

I haven't tested it, but I hope it should work. :) 

The above xsl:value-of is unfortunate and not always a good idea. One
example, where the difference becomes apparent:

  <subtitle>The Quick <quote>Brown</quote> Fox</subtitle>

If you use xsl:value-of, you get the complete _string_ of your
subtitle content---without any quotes. The quotes can only appear if you
allow your template to process its child elements. Use
xsl:apply-templates and you will see the quotes.



-- 
Gruß/Regards,
    Thomas Schraitle


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