On 17.5.2014 13:48, Thomas Schraitle wrote: > Digging deeper into the EPUB3 stylesheets, I assume the "dbtimestamp" PI > isn't > supported at all. The pubdate is used as OPF metadata in the following > template: > > <xsl:template match="date|pubdate" mode="opf.metadata"> > <xsl:variable name="date"> > <xsl:call-template name="format.meta.date"> > <xsl:with-param name="string" select="normalize-space(.)"/> > </xsl:call-template> > </xsl:variable> > <!-- ... ---> > </xsl:template> > > However, "format.meta.data" just checks if the given text is in the right > format. If not, it displays the above warning message. > > Now I'm wondering if this is the right approach. 8-) Shouldn't we distinguish > between two cases:
I think that instead of using . we should call apply-templates, so
<?dbtimestamp?> is processed. Something like:
<xsl:template match="date|pubdate" mode="opf.metadata">
<xsl:variable name="content">
<xsl:apply-templates/>
</xsl:variable>
<xsl:variable name="date">
<xsl:call-template name="format.meta.date">
<xsl:with-param name="string" select="normalize-space($content)"/>
</xsl:call-template>
</xsl:variable>
Jirka
--
------------------------------------------------------------------
Jirka Kosek e-mail: [email protected] http://xmlguru.cz
------------------------------------------------------------------
Professional XML consulting and training services
DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
Bringing you XML Prague conference http://xmlprague.cz
------------------------------------------------------------------
signature.asc
Description: OpenPGP digital signature
