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] DocBook epub3 beta 3 stylesheets available


Hi Jirka,
I just tried changing the following template in  template/titlepage.xsl:

<xsl:template match="t:templates">
 <xsl:element name="xsl:stylesheet">
   <!-- add this attribute -->
   <xsl:attribute name="xmlns">http://www.w3.org/1999/xhtml</xsl:attribute>

and it seems to add

xmlns="http://www.w3.org/1999/xhtml";

in the right place. That seems too easy. I'm used to doing all kinds of contortions to get namespaces correct. But I guess in this case we are not actually handling a namespace.

If it is that easy, then we could add a stylesheet parameter to template/titlepage.xsl to specify a default namespace, and conditionally add it if not blank. The customizer would have to know to set the param, but I think that would be ok.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- From: "Bob Stayton" <bobs@sagehill.net>
To: "Jirka Kosek" <jirka@kosek.cz>
Cc: "DocBook Apps" <docbook-apps@lists.oasis-open.org>; "Adam Witwer" <adam@oreilly.com>
Sent: Tuesday, October 04, 2011 8:38 AM
Subject: Re: [docbook-apps] DocBook epub3 beta 3 stylesheets available


Hi Jirka,
I ran into this same problem when creating the beta epub3 stylesheets. I had to add some templates for isbn, issn, and biblioid for epub metadata, so I needed to include an updated titlepage.templates.xsl in the beta distribution. For the beta, I admit I just edited it by hand after generating it so it would have that default namespace and work in the beta. I presume you created a custom version from template/titlepage.xsl, and that is where that namespace gets lost.

I think perhaps we need separate template/titlepage.xsl files for the different namespaced outputs. I haven't looked into it yet, but that would probably be easier than trying to do it with one stylesheet and different namespaces. I'm not sure how to do it, though.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- From: "Jirka Kosek" <jirka@kosek.cz>
To: "Bob Stayton" <bobs@sagehill.net>
Cc: "DocBook Apps" <docbook-apps@lists.oasis-open.org>; "Adam Witwer" <adam@oreilly.com>
Sent: Tuesday, October 04, 2011 6:58 AM
Subject: Re: [docbook-apps] DocBook epub3 beta 3 stylesheets available

On 4.10.2011 15:16, Jirka Kosek wrote:

When I convert with calibre all headings (chapter, section, table, ...)
are lost.

OK, problem were in titlepage.templates.xsl file. This file was missing
xmlns="http://www.w3.org/1999/xhtml"; and thus generated <div
xmlns=""...> in the middle of XHTML5 output which confused software.

This is known problem for customization of XHTML titlepages as well. Do
we already have some solution for this? In past I have used brutal text
replace on resulting .xsl file to add default namespace declaration.
Might be existing template/titlepage.xsl should be customized to handle
this automatically.

    Jirka




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