Skip to contentSkip to conversation

DocBook xmlto fixes

PATCH In review Martin Waitz 2 participants 4 messages Apr 11, 2005 Documentation

lore
Share & tools
lore
#0 lore raw

cover DocBook xmlto fixes

hoi :)

the following two patches fix some problems noticed by Alexey. I still have to look harder at the stylesheets to get nicely linked function lists in the toc.

@Andrew: lets test the xmlto converter in -mm a little bit longer. Should I keep sending relative patches or replacement patches? I guess we want to collapse patches before sending to Linus. (The patches before the xmlto one should be non-problematic and could be commited once Linus starts accepting patches again.)

--
Martin Waitz

#1 lore raw

PATCH 1/2 Docbook: use custom stylesheet

Docbook: use custom stylesheet

With the custom stylesheet, functions are rendered using ANSI-C syntax and xmlto is a bit quieter.

---
 Documentation/DocBook/Makefile       |    3 ++-
 Documentation/DocBook/stylesheet.xsl |    5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
Documentation/DocBook/Makefile +2 -1
Index: linux-docbook/Documentation/DocBook/Makefile
===================================================================
@@ -49,7 +49,8 @@ installmandocs: mandocs
 KERNELDOC = scripts/kernel-doc
 DOCPROC   = scripts/basic/docproc
 
-#XMLTOFLAGS = --skip-validation
+XMLTOFLAGS = -m Documentation/DocBook/stylesheet.xsl
+#XMLTOFLAGS += --skip-validation
 
 ###
 # DOCPROC is used for two purposes:
Documentation/DocBook/stylesheet.xsl new file +5 -0
Index: linux-docbook/Documentation/DocBook/stylesheet.xsl
===================================================================
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<param name="chunk.quietly">1</param>
+<param name="funcsynopsis.style">ansi</param>
+</stylesheet>

--
Martin Waitz

#2 lore raw

Re: [patch 1/2] Docbook: use custom stylesheet

Quoted 4 lines · Martin Waitz

Docbook: use custom stylesheet

With the custom stylesheet, functions are rendered using ANSI-C syntax and xmlto is a bit quieter.

Definitely better. Still remains (anything with more than 1 argument):
==================================================================
Synopsis

int bios_param (struct scsi_device *   sdev,
                struct block_device *  bdev,
                sector_t               capacity,
                int                    params[3]);

Arguments
==================================================================
Synopsis

int queuecommand (struct scsi_cmnd * scp,

                  void (*             done) (struct scsi_cmnd *));

Arguments
==================================================================

Nice to see [TeX mode on] -- [TeX mode off] instead of "--" after function name. ;-)

Second patch works.

#3 lore raw

PATCH 2/2 DocBook: fix html link

In reply to Martin Waitz

DocBook: fix html link

The start page for each book has changed from book1.html to index.html. Update our generated links acocrdingly.

---
 Documentation/DocBook/Makefile |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Documentation/DocBook/Makefile +1 -1
Index: linux-docbook/Documentation/DocBook/Makefile
===================================================================
@@ -115,7 +115,7 @@ quiet_cmd_db2pdf = XMLTO   $@
 
 quiet_cmd_db2html = XMLTO  $@
       cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
-		echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/book1.html"> \
+		echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \
          Goto $(patsubst %.html,%,$(notdir $@))</a><p>' > $@
 
 %.html:	%.xml

--
Martin Waitz