This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

XHTML stylesheet and namespace


Hi,
I've got some problem when I try to customize the xhtml stylesheet. The
generated document doesn't validate anymore (it does when it is processed
with the standard xhtml/docbook.xsl). The w3c validator shows some namespace
troubles:

... N."/></head><body><div class="article"><div xmlns="" class="titlepage"
...
Error: there is no attribute "xmlns" for this element (in this HTML version)

... e"><div xmlns="" class="titlepage"><div><h2 xmlns="http://www.w3.org/1
...
Error: there is no attribute "xmlns" for this element (in this HTML version)

....

The tools used are:
- saxon
- FOP

If someone has any clue...

Christophe

====================
my customized xsl is


<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">

  <xsl:import href="docbook.xsl"/>
  <xsl:include href="sample-titlepage.xsl"/>

  <xsl:param name="generate.toc">
appendix  toc
article   toc,figure,table,example,equation
book      toc,figure,table,example,equation
chapter   nop
part      toc
preface   toc
qandadiv  toc
qandaset  toc
reference toc
sect1     toc
sect2     toc
sect3     toc
sect4     toc
sect5     toc
section   toc
set       toc
  </xsl:param>

  <xsl:param name="section.autolabel" select="1"/>
  <xsl:param name="section.label.includes.component.label" select="1"/>
  <xsl:param name="use.extensions" select="'1'"/>
  <xsl:param name="saxon.extensions" select="1"/>

</xsl:stylesheet>

=========
the custom titlepage template (processed with templates/titlepage.xsl

<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0";
      xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param";
             xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<t:titlepage element="book" wrapper="div" class="titlepage">
    <t:titlepage-content side="recto">
      <title/>
      <subtitle/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <date/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <!-- copyright/ -->
      <legalnotice/>
      <abstract/>
    </t:titlepage-content>

  <t:titlepage-separator>
      <hr/>
  </t:titlepage-separator>

  <t:titlepage-before side="recto">
  </t:titlepage-before>

  <t:titlepage-before side="verso">
  </t:titlepage-before>
</t:titlepage>

<t:titlepage element="article" wrapper="div" class="titlepage">
    <t:titlepage-content side="recto">
      <title/>
      <subtitle/>
      <corpauthor/>
      <authorgroup/>
      <author/>
      <date/>
      <pubdate/>
      <revision/>
      <revhistory/>
      <!-- copyright/ -->
      <legalnotice/>
      <abstract/>
    </t:titlepage-content>

  <t:titlepage-separator>
      <hr/>
  </t:titlepage-separator>

  <t:titlepage-before side="recto">
  </t:titlepage-before>

  <t:titlepage-before side="verso">
  </t:titlepage-before>
</t:titlepage>

</t:templates>

=================
And the sample document:

<?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.0CR2//EN"
"http://www.oasis-open.org/docbook/xml/simple/1.0CR2/sdocbook.dtd";>

<article lang="en">
    <title>Sample Document</title>
    <subtitle>Specification</subtitle>
  <articleinfo>
    <releaseinfo role="meta">
      $Id:  $
    </releaseinfo>
    <pubdate><emphasis>20 August 2002</emphasis></pubdate>
    <authorgroup>
      <author><surname>Roudet</surname>
      <firstname>Christophe</firstname></author>
    </authorgroup>

    <copyright>
      <year>2002</year>
      <holder>Me</holder>
    </copyright>
    <legalnotice>
      <para>
        <emphasis role="bold">
Here put legal notice.
        </emphasis>
      </para>
    </legalnotice>

    <revhistory>
      <revision>
        <revnumber>$Revision: 1.1 $</revnumber>
        <date>$Date: 2002/08/26 15:36:35 $</date>
        <authorinitials>$Author: croudet $</authorinitials>
        <revremark>First Release</revremark>
      </revision>
      <revision>
        <revnumber>1</revnumber>
        <date>2002/08/20 15:13:59</date>
        <authorinitials>croudet</authorinitials>
        <revremark>Initial Release</revremark>
      </revision>
    </revhistory>
    <abstract>
      <para>A nice abstract would be nice</para>
    </abstract>
  </articleinfo>


  <section>
    <title>Introduction</title>
    <section>
      <title>Overview</title>
      <para>
        Present the content.
      </para>
      <para>
      This document presents the ...
      </para>
    </section>
    <section>
      <title>Definitions</title>
      <para>Some definitions :</para>
      <itemizedlist>
 <listitem>
   <para><emphasis role="bold">first def</emphasis>:</para>
   <para>....</para>
   <para>...
   </para>
 </listitem>
 <listitem>
   <para><emphasis role="bold">second def</emphasis> :</para>
   <para>...
   </para>
 </listitem>
      </itemizedlist>
    </section>

    <section>
      <title>References</title>
      <para>
 Other available documents are:
      </para>
      <itemizedlist>
 <listitem>
   <para>Document 1.
   </para>
 </listitem>
 <listitem>
   <para>Document 2.</para>
 </listitem>
      </itemizedlist>
    </section>
  </section>

  <section>
    <title>Section 1</title>
    <abstract><para>This section ...</para></abstract>
    <section>
      <title>Component Overview</title>
      <para>
 The figure <xref linkend="GSCDFig"/> shows ...
      </para>
      <figure id="GSCDFig">
 <title>Figure title</title>
 <mediaobject>
          <imageobject>
      <imagedata width="7cm" scalefit="1" fileref="figures/GS.png"
format="PNG"/>
    </imageobject>
   <textobject>
     <phrase>Image</phrase>
   </textobject>
 </mediaobject>
      </figure>
    </section>
  </section>

</article>





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]