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: XSL stylesheets HTML output issues (bugs?)


X-No-Archive: yes

Hi. I'm using the DocBook XSL stylesheets to generate HTML output *.
Some 
things about the output seem unusual to me. I am relatively new to
DocBook XSL though.
Issues:
a) Limited accessibility with rendered HTML elements.
b) Command synopsis arguments do not have attributes for CSS
referencing,
 nor any semantic markup.
c) The parameter(s) to make output HTML be valid ... do not output
valid HTML.

* DocBook XML 4.4, stylesheets 1.71.0, xsltproc, on Debian.

-----
a) Limited accessibility with rendered HTML elements.
Which HTML elements get output, for the same 'effect', seems to vary 
depending on which tag(s) were used in the XML source, and where they
were used.
Sometimes the <b> element is used for bolded text, though this is
deprecated 
and works poorly with assistive technologies like screenreaders. 
In other cases the <strong> tag is output.

example: <abstract><para>blah blah</para></abstract> on a titlepage
Renders: <div><div class="abstract"><p
class="title"><b>Abstract</b></p>
<p>blah blah</p></div></div>

In the same way,  <formalpara><title>Software</title><para> renders as
<p> <b>Software. </b> ...

But elsewhere, say an itemized list: 
<listitem><para><emphasis role="strong">Important</emphasis>: All ... 
...</para></listitem>
Renders: <li><p><span class="strong"><strong>Important</strong></span>:
All ... 
... </p></li>

Here the <i> HTML element is used, instead of <em>:
DocBook XML:
<cmdsynopsis>
<command>sysban.pl</command>
<group choice="opt">
<arg choice="plain">--list <arg choice="req"><synopfragmentref 
linkend="sysban_list">args</synopfragmentref></arg></arg>
<arg choice="plain">add <arg choice="req"><synopfragmentref 
linkend="sysban_add">args</synopfragmentref></arg></arg>
<arg choice="plain">modify <arg choice="req"><synopfragmentref 
linkend="sysban_modify">args</synopfragmentref></arg></arg>
</group> ...

HTML source:
<p><code class="command">sysban.pl</code>  [ --list {<i><a 
href="#sysban_list">(1)</a>&nbsp;args</i>}  |   add {<i><a 
href="#sysban_add">(2)</a>&nbsp;args</i>}  |   modify {<i><a 
href="#sysban_modify">(3)</a>&nbsp;args</i>} ]<br><br></p>

b) Command synopsis arguments when output do not have attributes for
CSS 
referencing, nor any semantic markup.
cmdsynopsis arguments are just output as plain text inside the <p> tag 
without styling attributes for CSS referencing (at least those using 
synopfragmentref/synopfragments are).

- HTML source
<p><a name="sysban_modify">(3)</a> { --banid=<em 
class="replaceable"><code>id</code></em>  |   --status=<em 
class="replaceable"><code>value</code></em>  |   --bandate=<em 
class="replaceable"><code>datetime</code></em>  |   
            { --banuntil=<em
class="replaceable"><code>datetime</code></em>  
            |   --banlength=<em
class="replaceable"><code>duration</code></em> }
              |   --value=<em
class="replaceable"><code>value</code></em>  
              |   --note=<em
class="replaceable"><code>string</code></em> }</p>

- Copy+paste from rendered HTML:
(3) { --banid=id | --status=value | --bandate=datetime | {
--banuntil=datetime 
| --banlength=duration } | --value=value | --note=string }

DocBook XML source:
...
<synopfragment id="sysban_modify">
    <group choice="plain">
        <arg choice="plain">--banid=<replaceable 
        class="parameter">id</replaceable></arg>
        <arg choice="plain">--status=<replaceable 
        class="parameter">value</replaceable></arg>
        <arg choice="plain">--bandate=<replaceable 
        class="parameter">datetime</replaceable></arg>
            <arg choice="plain">
            <group choice="req">
                <arg choice="plain">--banuntil=<replaceable 
                class="parameter">datetime</replaceable></arg>
                <arg choice="plain">--banlength=<replaceable 
                class="parameter">duration</replaceable></arg>
            </group>
            </arg>
        <arg choice="plain">--value=<replaceable 
        class="parameter">value</replaceable></arg>
        <arg choice="plain">--note=<replaceable 
        class="parameter">string</replaceable></arg>
    </group>
</synopfragment> ...

c) The parameter(s) to make output HTML be valid ... do not output
valid HTML.
Using <xsl:param name="make.valid.html" select="1"></xsl:param> 
(am also using <xsl:param name="html.cleanup" select="1"></xsl:param>),
the HTML output is not 
valid, because no doctype [http://www.alistapart.com/stories/doctype/]
is 
included. This makes popular browsers render the pages in "quirks
mode", etc.
I added the necessary markup (had to be split between params) - 
<xsl:param name="chunker.output.doctype-public">-//W3C//DTD HTML 4.01 
Transitional//EN</xsl:param>
<xsl:param name="chunker.output.doctype-
system">http://www.w3.org/TR/html4/loose.dtd</xsl:param>
-  which made the output valid, but am surprised it wasn't done
automatically. 
Well, seemed unusual to me at any rate.

-- 
Richard.




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