[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Epub and Saxon
It is a bug in the epub/docbook.xsl stylesheet file.
This template:
<xsl:template match="d:author|d:corpauthor"
mode="opf.metadata">
creates the dc:creator element and tries to add an attribute
named "opf:file-as" by calling the template named
'person.name.last-first'. However, that template generates an HTML
<span> element, and you cannot put an element into an attribute
value. The solution is to take the text value of the that template
call:
<xsl:template match="d:author|d:corpauthor"
mode="opf.metadata">
<xsl:variable name="n"> <xsl:call-template name="person.name"> <xsl:with-param name="node" select="."/> </xsl:call-template> </xsl:variable> <xsl:element name="dc:creator"> <xsl:attribute name="opf:file-as"> <xsl:variable name="attvalue"> <xsl:call-template name="person.name.last-first"> <xsl:with-param name="node" select="."/> </xsl:call-template> </xsl:variable> <xsl:value-of select="$attvalue"/> </xsl:attribute> <xsl:value-of select="normalize-space(string($n))"/> </xsl:element> </xsl:template> I'll fix this in the source, and you can use this in your
customization layer.
From: Marcel Tromp
Sent: Tuesday, April 02, 2013 1:40 PM
To: Bob
Stayton
Cc: docbook-apps
Subject: Re: [docbook-apps] Epub and Saxon It is the author element in info that triggers the problem:
<author>
<personname> <firstname>Marcel</firstname> <surname>Tromp</surname> </personname> </author> If I use an empty authorgroup, no errors are generated. The error I showed
before is generated twice: once for firstname, once for lastname.
MT
-- On Tue, Apr 2, 2013 at 8:56 AM, Bob Stayton <bobs@sagehill.net> wrote:
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]