Page 1 of 1

DTD declaration in epub files

Posted: Fri Jun 17, 2011 2:27 pm
by burbles
When I transform valid XML files using the DocBook 5 stylesheets, I get a DTD declaration just after the “<?xml version="1.0" encoding="utf-8" standalone="no"?>” declaration in content.opf, toc.ncx and container.xml files. All the XHTML files that are generated also contain the DTD, but it seems this doesn't pose any validation problems. I am running the transformation in oXygen 12.2 using the docbook 1.76.1 epub stylesheets (not the built-in ANT transformation) and Saxon 6.5.5. Has anyone come across this?

Code: Select all

Content.opf
<!DOCTYPE package
PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Toc.ncx
<!DOCTYPE ncx
PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Container.xml
<!DOCTYPE container
PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Re: DTD declaration in epub files

Posted: Fri Jun 17, 2011 2:36 pm
by sorin_ristache
Hello,

There is a bug report with that problem opened in the Docbook XSL project. If you submit a vote or comment on that bug the project maintainers may increase its priority.


Regards,
Sorin

Re: DTD declaration in epub files

Posted: Fri Jun 17, 2011 2:44 pm
by burbles
Thanks Sorin - I reopened that bug report; I was just looking for others on this forum who may have had the problem too.
Dave

Re: DTD declaration in epub files

Posted: Fri Jun 17, 2011 3:03 pm
by sorin_ristache
I also sent the details for reproducing it:

-- DocBook XSL version 1.76.1 (latest version)

-- any Docbook XML file, for example:

Code: Select all

<article xmlns="http://docbook.org/ns/docbook" version="5.0">
<info>
<title>Article Template Title</title>
</info>
<sect1>
<title>Section1 Title</title>
<subtitle>Section1 Subtitle</subtitle>
<para>Text</para>
</sect1>
</article>
-- the command line:

Code: Select all

java  -cp lib\saxon.jar  com.icl.saxon.StyleSheet  -o sample.epub  docbook-epub-sample.xml  docbook\xsl\epub\docbook.xsl

The wrong DOCTYPE declaration is inserted with both the Saxon 6.5 processor and the Xalan one.


Regards,
Sorin