[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Bad DOCTYPE on toc.ncx in epub2 stylesheets snapshot
Hi Jirka, Thanks for the information. It turns out that you were exactly correct. In xhtml-1_1 (which epub2 uses), the files docbook.xsl, maketoc.xsl, and profile-docbook.xsl each contain the following line: <xsl:output method="xml" encoding="UTF-8" indent="no" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/> Apparently, this causes all files to have this doctype added, including content.opf and toc.ncx, which use different schemas. When I remove the attributes doctype-public and doctype-system from this line in all three files, the problem goes away and the epub validates correctly against epubcheck. BTW, your message reminded me that I ran into (and fixed) this same problem about a year ago, fixed it, and then forgot about it:-). Update: I just went to sourceforge and found that this problem has been reported, closed, and reopened a couple of times:-). It looks like it may be a case where only some processors exhibit this behavior (possibly just saxon6). It's probably worth checking out with later versions of saxon and xsltproc, but I don't have the time to do that now. I'll try to look at it again in a week or so. Best regards, Dick ------- XML Press XML for Technical Communicators http://xmlpress.net hamilton@xmlpress.net On Oct 2, 2014, at 1:35, Jirka Kosek <jirka@kosek.cz> wrote: > On 2.10.2014 2:22, Richard Hamilton wrote: >> <!DOCTYPE ncx >> PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> >> >> There is a valid xmlns attribute on the root element, and if you remove the DOCTYPE lines completely, the file is fine. In 1.78.1 this does not happen. >> >> I poked around the stylesheets, but couldn't figure out what's going on, and I didn't see anything in the revision history that seemed pertinent. >> >> Has anyone run into the same thing? > > I never used EPUB2 stylesheets, but trouble spot is: > > <xsl:template name="ncx"> > <xsl:call-template name="write.chunk"> > ... > <xsl:with-param name="doctype-public" select="''"/> <!-- > intentionally blank --> > <xsl:with-param name="doctype-system" select="''"/> <!-- > intentionally blank --> > > Specifying empty doctype usually doesn't override doctype specified on > xsl:output. You might try disabling doctype everywhere, it shouldn't > matter even for XHTML content inside EPUB package. > > Jirka > > -- > ------------------------------------------------------------------ > Jirka Kosek e-mail: jirka@kosek.cz 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 > ------------------------------------------------------------------ >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]