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: [QUESTION] Generating XHTML 1.1 from docbook-xsl


Hi all

I am attempting to produce XHTML 1.1 output from my DocBook source.
Having followed the guidelines at the following link:

http://www.sagehill.net/docbookxsl/OtherOutputForms.html#StrictXhtmlValid

I only have two errors left.  Specifically, given the following files...

==============================================================================
test.dbk
--------
<?xml version='1.0'?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
                  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd";>

<article>
  <para>
    <important>
      <para>
    test
      </para>
    </important>
  </para>
</article>
==============================================================================
test.xsl
--------
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version='1.0' xmlns="http://www.w3.org/TR/xhtml";>
  <xsl:import 
href="/usr/share/xml/docbook/stylesheet/nwalsh/xhtml/docbook.xsl"/>

  <!-- PARAMETERS -->

  <!-- Admonitions -->
  <xsl:param name="admon.graphics">1</xsl:param>

  <!-- HTML -->
  <xsl:param name="css.decoration">0</xsl:param>
  <xsl:param name="html.longdesc">0</xsl:param>
  <xsl:param name="make.valid.html">1</xsl:param>
  <xsl:param name="html.cleanup">1</xsl:param>

  <!-- Linking -->
  <xsl:param name="ulink.target"></xsl:param>

  <!-- Graphics -->
  <xsl:param name="use.viewport">0</xsl:param>


  <!-- OUTPUT -->

  <xsl:output method="xml"
    encoding="UTF-8"
    indent="yes"
    doctype-public="-//W3C//DTD XHTML 1.1//EN"
    doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/>
</xsl:stylesheet>
==============================================================================
test.sh
-------
#!/bin/sh

xsltproc -o test.xhtml test.xsl test.dbk
==============================================================================

...running test.sh produces the following output
(I have adjusted white space for readability):

==============================================================================
test.xhtml
----------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
               "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <title></title>
    <meta name="generator" content="DocBook XSL Stylesheets V1.68.1"/>
  </head>
  <body>
    <div class="article" lang="en">
      <div class="titlepage">
        <hr/>
      </div>
      <p>
      </p>
      <div class="important" style="margin-left: 0.5in; margin-right: 
0.5in;">
        <table border="0" summary="Important">
          <tr>
            <td rowspan="2" align="center" valign="top" width="25">
              <img alt="[Important]" src="images/important.png"/>
            </td>
            <th align="left">Important</th>
          </tr>
          <tr>
            <td align="left" valign="top">
              <p>
                test
              </p>
            </td>
          </tr>
        </table>
      </div>
      <p>
      </p>
    </div>
  </body>
</html>
==============================================================================

Validating this against XHTML 1.1 gives the following errors:

==============================================================================
Error /Line 9 column 30/: there is no attribute "lang".
| <div class="article" lang=*"*en">|

Error /Line 18 column 62/: there is no attribute "width".
|... <td rowspan="2" align="center" valign="top" width=*"*25">|
==============================================================================

My questions are these:

* Is there a way to eliminate these errors while keeping the XHTML output
unchanged?  (For example, I know that I could cut out the second error by
disabling graphical admonitions.)

* If not, could I submit a feature request that a future release of the
stylesheets provide a means of avoiding these errors?

NB The documentation for the stylesheets states:

"There is no option or parameter for turning on Strict XHTML processing."

and I understand this.  I am quite happy to comply with a series of
restrictions, of the sort given at:

http://www.sagehill.net/docbookxsl/OtherOutputForms.html#StrictXhtmlValid

My toolchain is as follows:

==============================================================================
DocBook v4.4

$ xsltproc --version
Using libxml 20626, libxslt 10117 and libexslt 813
xsltproc was compiled against libxml 20626, libxslt 10117 and libexslt 813
libxslt 10117 was compiled against libxml 20626
libexslt 813 was compiled against libxml 20626

docbook-xsl v1.71.1
==============================================================================

Regards
Kevin



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