]> git.sesse.net Git - vlc/commitdiff
Use xlstproc instead of jade for HTML output
authorClément Stenac <zorglub@videolan.org>
Mon, 7 Jun 2004 19:13:05 +0000 (19:13 +0000)
committerClément Stenac <zorglub@videolan.org>
Mon, 7 Jun 2004 19:13:05 +0000 (19:13 +0000)
Output PDF instead of PS

You will need
 * xsltproc
 * the docbook XSL package

doc/developer/Makefile
doc/developer/history.xml
doc/developer/manual.xml
doc/developer/stylesheet-print-noicones.dsl [new file with mode: 0644]
doc/developer/stylesheet-txt.dsl [new file with mode: 0644]
doc/developer/videolan-doc-chunk.xsl [new file with mode: 0644]
doc/developer/videolan-doc.xsl [new file with mode: 0644]

index fe12a8268d25b65be7494b9da2910a68634f4a31..d0a5d2649e7f51bff0a65884acb244674080e42d 100644 (file)
@@ -1,63 +1,42 @@
-# Extract from the Debian SGML/XML HOWTO by Stéphane Bortzmeyer
+# Makefile for VideoLAN Doc
+#  Clément Stenac
+#  Anil Daoud
 
-MAX_TEX_RECURSION=4
+XSLTPROC=xsltproc
+LYNX=lynx
+JADE=jade
 
-# For Debian :
-#XML_DECL=/usr/lib/sgml/declaration/xml.decl
-#HTML_SS=/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/docbook.dsl
-#PRINT_SS=/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/docbook.dsl
-
-# For RedHat :
-# XML_DECL=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/dtds/decls/xml.dcl
-# HTML_SS=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/html/docbook.dsl
-# PRINT_SS=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/print/docbook.dsl
-
-# For Mac OS X :
-#XML_DECL=/sw/share/sgml/dsssl/docbook-dsssl-nwalsh/dtds/decls/xml.dcl
-#HTML_SS=/sw/share/sgml/dsssl/docbook-dsssl-nwalsh/html/docbook.dsl
-#PRINT_SS=/sw/share/sgml/dsssl/docbook-dsssl-nwalsh/print/docbook.dsl
-#JADE=openjade
-
-JADE=openjade
-LYNX=/usr/bin/lynx
-DVIPS=/usr/bin/dvips
-JADETEX=/usr/bin/jadetex
-
-XML_DECL=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/dtds/decls/xml.dcl
-HTML_SS=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/html/docbook.dsl
-PRINT_SS=/usr/share/sgml/docbook/dsssl-stylesheets-1.76/print/docbook.dsl
-
-DOCS=manual.html manual.txt manual.ps
+XML_DECL := /usr/lib/sgml/declaration/xml.decl
+XSL_CHUNK = videolan-doc-chunk.xsl
+XSL = videolan-doc.xsl
 
 all: manual
 
-
-manual: manual.txt manual.ps manual.html
-
-manual.tex: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
-       $(JADE) -t tex -V %section-autolabel% -d $(PRINT_SS) $(XML_DECL) manual.xml
-       perl -i.bak -pe 's/\000//g' $@ && rm $*.tex.bak
-# No it's not a joke
-
-manual.html: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
-       $(JADE) -t sgml -V %section-autolabel% -V nochunks \
-         -d $(HTML_SS) $(XML_DECL) manual.xml > $@
-
-manual.dvi: manual.tex modules.eps ps.eps stream.eps ts.eps
-       $(JADETEX) manual.tex
-       $(JADETEX) manual.tex
-       $(JADETEX) manual.tex
-
-manual.ps: manual.dvi
-       $(DVIPS) -f $< > $@
-
-manual.txt: audio_output.xml debugging.xml decoders.xml gfdl.xml glossary.xml history.xml input.xml interface.xml manual.xml overview.xml ports.xml video_output.xml
-       $(JADE) -t sgml -V nochunks -d $(HTML_SS) $(XML_DECL) manual.xml > dump.html
-       $(LYNX) -force_html -dump dump.html > $@
-       -rm -f dump.html
+manual: manual.html all-html manual.pdf manual.txt
+
+# HTML
+all-html: *.xml
+       xsltproc $(XSL_CHUNK) manual.xml
+       mv *.html html
+
+manual.html: *.xml
+       xsltproc $(XSL) manual.xml > manual.html
+
+# PDF
+manual.pdf: *.xml
+       jade -t tex -d stylesheet-print-noicones.dsl -o manual.tex $(XML_DECL) manual.xml
+       pdfjadetex manual.tex
+       pdfjadetex manual.tex
+       pdfjadetex manual.tex
+       rm -f *.tex *.out *.aux *.log
+       
+# TXT
+manual.txt:  *.xml
+       $(JADE) -t sgml -d stylesheet-txt.dsk $(XML_DECL) manual.xml > text.html
+       $(LYNX) -force_html -dump text.html > manual.txt
+       rm -f text.html
 
 clean:
        rm -f manual.txt
-       rm -f *.html *.aux *.log *.dvi *.ps *.tex
-       rm -f *.bck *~ .\#* \#*
-
+       rm -f *.html *.aux *.log *.tex
+       rm -f html/*.html
index bb6e2675be3215fd3add8ceae12b059e79625592..5b7faad25c218fd57fb4ca8ff4d5debf57e22a87 100644 (file)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="iso-8859-15" ?>
 <appendix> <title> Project history </title>
 
   <sect1> <title> VIA and the Network2000 project </title>
index 3d23d79ba350e7500526c69269e1219c8af6452f..a40a4e63216e714696160779e882b3ef0796f170 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
 
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd"
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "/usr/share/sgml/docbook/dtd/xml/4.1/docbookx.dtd"
 [
     <!ENTITY glossary SYSTEM "glossary.xml">
     <!ENTITY overview SYSTEM "overview.xml">
@@ -15,7 +15,7 @@
     <!ENTITY gfdl SYSTEM "gfdl.xml">
 ]>
 
-<book>
+<book id="vlc-dev-doc">
 
 <title> VLC media player API Documentation </title>
 
diff --git a/doc/developer/stylesheet-print-noicones.dsl b/doc/developer/stylesheet-print-noicones.dsl
new file mode 100644 (file)
index 0000000..8e37709
--- /dev/null
@@ -0,0 +1,44 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY dbstyle SYSTEM
+"/usr/share/sgml/docbook/stylesheet/dsssl/modular/print/docbook.dsl" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification use="docbook">
+<style-specification-body>
+
+; Personnalization of James Clark's stylesheet for PS & PDF output
+; These parameters overide James Clark's one.
+; Written by Alexis de Lattre (alexis@videolan.org)
+
+; Only produce a table of contents (not a table of figure, etc...)
+(define ($generate-book-lot-list$)
+  (list ))
+
+; Depth of the table of contents
+(define (toc-depth nd)
+      2)
+
+; Magins
+(define %left-margin%
+  3pi)
+
+(define %right-margin%
+  3pi)
+
+(define %top-margin%
+  5pi)
+
+(define %bottom-margin%
+  3.5pi)
+
+(define %header-margin%
+  2pi)
+
+(define %footer-margin%
+  2pi)
+
+</style-specification-body>
+</style-specification>
+<external-specification id="docbook" document="dbstyle">
+</style-sheet>
diff --git a/doc/developer/stylesheet-txt.dsl b/doc/developer/stylesheet-txt.dsl
new file mode 100644 (file)
index 0000000..c746c87
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY dbstyle SYSTEM "/usr/share/sgml/docbook/stylesheet/dsssl/modular/html/docbook.dsl" CDATA DSSSL>
+]>
+
+<style-sheet>
+<style-specification use="docbook">
+<style-specification-body>
+
+; Personnalization of James Clark's stylesheet for Text output
+; These parameters overide James Clark's one.
+; Written by Alexis de Lattre (alexis@videolan.org)
+
+; Only produce a table of contents (not a table of figure, etc...)
+(define ($generate-book-lot-list$)
+  (list ))
+
+; Depth of the table of contents
+(define (toc-depth nd)
+      1)
+
+; No icons
+(define %admon-graphics%
+  #f)
+
+; Are sections enumerated?
+(define %section-autolabel%
+  #t)
+
+
+</style-specification-body>
+</style-specification>
+<external-specification id="docbook" document="dbstyle">
+</style-sheet>
diff --git a/doc/developer/videolan-doc-chunk.xsl b/doc/developer/videolan-doc-chunk.xsl
new file mode 100644 (file)
index 0000000..1aab791
--- /dev/null
@@ -0,0 +1,12 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0' xmlns="http://www.w3.org/TR/xhtml1/transitional" exclude-result-prefixes="#default">
+
+<xsl:import href="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/xhtml/chunk.xsl"/>
+
+<xsl:variable name="toc.section.depth">1</xsl:variable>
+<xsl:param name="chunker.output.encoding" select="'iso-8859-15'"/>
+<xsl:param name="chunk.section.depth" select="0"/>
+<xsl:param name="html.stylesheet" select="'../screen.css'"/>
+
+
+</xsl:stylesheet>
+
diff --git a/doc/developer/videolan-doc.xsl b/doc/developer/videolan-doc.xsl
new file mode 100644 (file)
index 0000000..9c00110
--- /dev/null
@@ -0,0 +1,9 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0' xmlns="http://www.w3.org/TR/xhtml1/transitional" exclude-result-prefixes="#default">
+
+<xsl:import href="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/xhtml/docbook.xsl"/>
+
+<xsl:param name="html.stylesheet" select="'screen.css'"/>
+
+
+</xsl:stylesheet>
+