docbook: Updated XSL Stylesheets


Previous by date: 4 Jul 2003 03:58:10 -0000 Re: entity not a function name error, Emma Jane Hogbin
Next by date: 4 Jul 2003 03:58:10 -0000 Re: Updated XSL Stylesheets, Emma Jane Hogbin
Previous in thread: 4 Jul 2003 03:58:10 -0000 Re: Updated XSL Stylesheets, Bob Stayton
Next in thread: 4 Jul 2003 03:58:10 -0000 Re: Updated XSL Stylesheets, Emma Jane Hogbin

Subject: Re: Updated XSL Stylesheets
From: Emma Jane Hogbin ####@####.####
Date: 4 Jul 2003 03:58:10 -0000
Message-Id: <20030704035809.GA1464@xtrinsic.com>

On Tue, Jul 01, 2003 at 08:23:52PM -0500, David Horton wrote:
> Some day soon I would like to process the same Docbook XML document 
> using both Norman Walsh's docbook-xsl and the tldp-xsl customizations 
> and then put the html outputs through a validator.  This should 
> determine which one is causing the HTML sloppiness.

I've found that the problems are in the tldp-html-common.xsl file. I don't
have enough vocabulary to describe the problem properly; however, I'll
give it a try. David I'll email you my two revised files: styles.css and
tldp-html-common.xsl -- I've added some comments to the top of the xsl
file.

There are a number of elements that are specifically called in the
tldp-html-common.xsl file: <pre>, author headings (calls <i>) and <meta>.
These are the only elements that do not validate correctly because of an
xmlns attribute that is not allowed in the (above) elements.

An example looks like this:

<xsl:template name="user.head.content">
  <xsl:param name="node" select="."/>
  <meta name="generator" content="Experimental LDP.XSL $Revision: 1.4 $"/>
  <xsl:text>
  </xsl:text>
  <xsl:comment> Generated by LDP XSLT customization layer
      based on Norman Walsh's DocBook XSL stylesheets.
      More information at http://www.tldp.org/ </xsl:comment>
  <xsl:text>
  </xsl:text>
</xsl:template>

NOTE: the <meta /> tag. This results in an incorrectly added xmlns in the
final HTML document. I don't know enough about XSLT to know how to fix
this, but there must be a way to print an element that is recognized
somehow and therefore doesn't get an xmlns attribute added to it.

I propose competely removing the formatting changes for <pre>. All they
were doing was adding a table with a background color. This can be done in
the stylesheets. Another style sheet correctly adds a
class="docbookattribute" if tldp-html-common.xsl <pre> section is removed, 
which is good as specific classes can be styled from the style sheet if
you want to have one type of <pre> that is different from another.

So that the formatting isn't lost the following should be added to the
styles.css file:
	pre {
		background: #E0E0E0;
		margin: 0 5%;
		padding: 5%;
	}
This duplicates the styling effects that were being achieved by the XSLT
template which means the <table> formatting can be removed.

In the styles.css file I would reduce the margin to:
	body {
		margin: 5%; /* was 72pt; */
		font-family: sans-serif;
	}

I hope this helps!

emma

-- 
Emma Jane Hogbin
[[ 416 417 2868 ][ www.xtrinsic.com ]]

Previous by date: 4 Jul 2003 03:58:10 -0000 Re: entity not a function name error, Emma Jane Hogbin
Next by date: 4 Jul 2003 03:58:10 -0000 Re: Updated XSL Stylesheets, Emma Jane Hogbin
Previous in thread: 4 Jul 2003 03:58:10 -0000 Re: Updated XSL Stylesheets, Bob Stayton
Next in thread: 4 Jul 2003 03:58:10 -0000 Re: Updated XSL Stylesheets, Emma Jane Hogbin


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.