This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] Re: Customizing docbook.xsl tests=HTML_20_30,USER_AGENT_MOZILLA_UAversion=2.50
- From: Norman Walsh <ndw at nwalsh dot com>
- To: Sorin Marti <mas at semafor dot ch>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Tue, 20 May 2003 12:30:23 -0400
- Subject: [docbook-apps] Re: Customizing docbook.xsl tests=HTML_20_30,USER_AGENT_MOZILLA_UAversion=2.50
- References: <3EAD2B11.50101@semafor.ch>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[ Follow-ups to docbook-apps, please ]
/ Sorin Marti <mas@semafor.ch> was heard to say:
| Hi all,
|
| I'd like to generate HTML output with docbook and I want to make my
| own layout (e.g. link colors, background color, etc.)
| I have an example file (test.xml) and a stylesheet (stylesheet.xsl)
|
| If I use the docbook-toys (v.0.61.0) like this:
|
| db2html test.xml
|
| I get my document as expected but withot my changes.
|
| my stylesheet looks like that:
| ######
| <?xml version="1.0" encoding="iso-8859-1"?>
| <xsl:stylesheet
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
| version="1.0"
| xmlns:fo="http://www.w3.org/1999/XSL/Format">
|
| <!-- Original DocBook Stylesheet -->
|
| <xsl:import
| href="/usr/share/sgml/docbook/docbook-xsl-stylesheets-1.53.0/html/docbook.xsl"/>
|
| <!-- My Style (just a dummy test) -->
|
| <xsl:template match="preface">
| <h1>HERE COMES THE PREFACE</h1>
| </xsl:template>
Note, you've completely replaced the preface. You might be happier with:
<xsl:template match="preface">
<h1>HERE COMES THE PREFACE</h1>
<xsl:apply-imports/>
</xsl:template>
| </xsl:stylesheet>
| ######
|
| my xml file look like:
| ######
| <!DOCTYPE book PUBLIC
| "-//OASIS//DTD DocBook V4.1//EN" "/usr/share/sgml/db41xml/docbookx.dtd">
|
| <?xml-stylesheet
| type="text/xsl"
| href="file://home/mas/projekte/docbook/stylesheet.xsl"?>
|
| <book id="How-to" lang="de">
|
| <bookinfo>
| <title>Docbook HowTo</title>
| <author><firstname>Sorin</firstname><surname>Marti</surname></author>
| <copyright><year>2001</year><holder>SEMAFOR Informatik & Energie
| AG</holder></copyright>
| <releaseinfo>Version 0.1</releaseinfo>
| <date>28. April 2003</date>
| </bookinfo>
|
| <preface>
| <title>Preface</title>
| <para></para>
| </preface>
|
| <!-- some test chapters go here -->
|
| </book>
| ######
|
| I expect that in the preface section should appear the text I inserted
| in my stylesheet but it doesn't.
|
| If I use DocBook-utils (v.0.6.6 (jw version 1.1)) like:
|
| docbook2html test.xml
|
| I get lots of errors:
| ########
| Using catalogs: /usr/share/sgml/html/catalog,
| /usr/share/sgml/docbook/dsssl-stylesheets-1.77/dtds/html/catalog,
| /usr/share/sgml/docbook/dsssl-stylesheets-1.77/html/catalog,
Well, docbook2html is trying to use DSSSL and you're using XSL.
| Is something wrong with my installation or is my way absolutely wrong?
| Please help me.
I'm not sure what the appropriate "xsl" wrapper is, but you can always
run the stylesheet by hand using your favorite XSLT processor.
Be seeing you,
norm
- --
Norman Walsh <ndw@nwalsh.com> | The fact of having been born is
http://www.oasis-open.org/docbook/ | bad augury for
Chair, DocBook Technical Committee | immortality.--Santayana
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>
iD8DBQE+ylgeOyltUcwYWjsRAvYcAKCgqlk1o8AYgPg0B9VsHz85qllWOQCeMRz8
8qSFGfTSpg4PzZfuqr+g0bo=
=CrRt
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org