Commits

Shlomi Fish committed 44d7c8b

Add the lib/sgml direcotry for docmake.

So it will properly build as onechunk.

Comments (0)

Files changed (15)

 BAD_ELEMENTS_DB5 = lib/tutorials/bad-elements/bad-elements.docbook5.xml
 BAD_ELEMENTS_SOURCE_XML = src/tutorials/bad-elements/perl-elements-to-avoid.xml-grammar-vered.xml
 BAD_ELEMENTS_XSLT = src/tutorials/bad-elements/vered-xml-to-docbook.xslt
+BAD_ELEMENTS_XHTML = lib/tutorials/bad-elements/bad-elements.xhtml
 
-bad_elements_html: $(BAD_ELEMENTS_DB5)
+bad_elements_html: $(BAD_ELEMENTS_XHTML)
 
 $(BAD_ELEMENTS_DB5): $(BAD_ELEMENTS_XSLT) $(BAD_ELEMENTS_SOURCE_XML)
 	xsltproc -o $@ $(BAD_ELEMENTS_XSLT) $(BAD_ELEMENTS_SOURCE_XML)
 	jing rng/docbook.rng $@
+
+# -x lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-xhtml-onechunk.xsl
+# --basepath $(HOME)/Download/unpack/file/docbook/docbook-xsl-ns-snapshot
+$(BAD_ELEMENTS_XHTML): $(BAD_ELEMENTS_DB5)
+	docmake -x lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-xhtml-onechunk.xsl -o $@ xhtml-1_1 $<

lib/sgml/shlomif-docbook/dsssl-stylesheets/jadetex.cfg

+\hypersetup{urlcolor=blue}

lib/sgml/shlomif-docbook/dsssl-stylesheets/shlomif-essays.dsl

+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY html-ss 
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl>
+<!ENTITY print-ss
+  PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl>
+]>
+<style-sheet>
+<style-specification id="print" use="print-stylesheet">
+<style-specification-body> 
+(define %bop-footnotes%
+   ;; Make "bottom-of-page" footnotes?
+   #t)
+
+(declare-flow-object-class formatting-instruction
+  "UNREGISTERED::James Clark//Flow Object Class::formatting-instruction")
+
+(element ulink
+  (let ((type (attribute-string (normalize "type"))))
+    (if (equal? type "htmlonly")
+      (sosofo-append
+        (process-children)                ;; Wrote the text
+      )
+      (sosofo-append
+        (make formatting-instruction  data: "\\href{" )
+        (make formatting-instruction 
+            data: (attribute-string (normalize "url")) )
+        (make formatting-instruction  data: "}{" )
+        (process-children) ;; Wrote the text with its format (HTML anchor)
+        (make formatting-instruction  data: "}" ) )
+    )
+  )
+)
+
+(define %generate-article-toc%
+    1
+)
+
+(define (toc-depth nd)
+    100
+)
+
+</style-specification-body>
+</style-specification>
+<style-specification id="html" use="html-stylesheet">
+<style-specification-body> 
+
+;; customize the html stylesheet
+(define %html-ext%
+    ".html"
+)
+
+; Make sure there is a table of contents
+(define %generate-article-toc%
+    1
+)
+
+(define (toc-depth nd)
+    100
+)
+
+</style-specification-body>
+</style-specification>
+<external-specification id="print-stylesheet" document="print-ss">
+<external-specification id="html-stylesheet"  document="html-ss">
+</style-sheet>
+

lib/sgml/shlomif-docbook/xsl-5-stylesheets/rejects.xsl

+    <div class="center ads_top">
+    <script type="text/javascript">
+google_ad_client = "pub-2480595666283917";
+google_ad_width = 468;
+google_ad_height = 60;
+google_ad_format = "468x60_as";
+google_ad_type = "text";
+google_ad_channel ="";
+google_color_border = "336699";
+google_color_text = "000000";
+google_color_bg = "FFFFFF";
+google_color_link = "0000FF";
+google_color_url = "008000";
+</script>
+<script type="text/javascript"
+  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+</script>
+    </div>
+

lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-fo.xsl

+<?xml version='1.0' encoding='UTF-8'?>
+<xsl:stylesheet
+     version='1.0'
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/fo/docbook.xsl" />
+    <xsl:import href="shlomif-essays-5.xsl" />
+
+<!--colored and hyphenated links -->
+<xsl:template match="ulink">
+    <fo:basic-link external-destination="{@url}"
+         xsl:use-attribute-sets="xref.properties"
+         text-decoration="underline"
+         color="blue">
+         <xsl:choose>
+         <xsl:when test="count(child::node())=0">
+         <xsl:value-of select="@url"/>
+         </xsl:when>
+         <xsl:otherwise>
+         <xsl:apply-templates/>
+         </xsl:otherwise>
+         </xsl:choose>
+    </fo:basic-link>
+</xsl:template>
+</xsl:stylesheet>

lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-xhtml-common.xsl

+<?xml version='1.0' encoding='UTF-8'?>
+<xsl:stylesheet
+    exclude-result-prefixes="d"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:d="http://docbook.org/ns/docbook"
+    version='1.0'
+    >
+
+    <!--
+         Commented out because it does not work properly.
+    <xsl:template name="anchor">
+        <xsl:param name="node" select="."/>
+        <xsl:param name="conditional" select="1"/>
+        <xsl:variable name="id">
+            <xsl:call-template name="object.id">
+                <xsl:with-param name="object" select="$node"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:attribute name="id">
+            <xsl:value-of select="$id" />
+        </xsl:attribute>
+
+    </xsl:template>
+    -->
+</xsl:stylesheet>

lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-xhtml-onechunk.xsl

+<?xml version='1.0' encoding='UTF-8'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version='1.0'>
+
+    <xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/onechunk.xsl" />
+    <xsl:import href="shlomif-essays-5-xhtml-common.xsl" />
+
+    <!-- Avoid Generating a Table-of-Contents-->
+    <xsl:param name="generate.toc"></xsl:param>
+
+<!-- Disable the title="" attribute in sections. -->
+<xsl:template name="generate.html.title">
+</xsl:template>
+
+</xsl:stylesheet>
+

lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-xhtml.xsl

+<?xml version='1.0' encoding='UTF-8'?>
+<xsl:stylesheet
+    exclude-result-prefixes="d"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:d="http://docbook.org/ns/docbook"
+    version="1.0"
+    >
+    <xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/chunk.xsl" />
+    <xsl:import href="shlomif-essays-5-xhtml-common.xsl" />
+    <xsl:param name="use.id.as.filename">1</xsl:param>
+    <xsl:param name="html.stylesheet">style.css</xsl:param>
+    <xsl:param name="itemizedlist.propagates.style">1</xsl:param>
+    <xsl:param name="chunker.output.doctype-public">-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:param>
+    <xsl:param name="chunker.output.doctype-system">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:param>
+    <!-- Parameters for Generating Strict Output. See:
+    http://www.sagehill.net/docbookxsl/OtherOutputForms.html#StrictXhtmlValid
+    -->
+    <xsl:param name="css.decoration">0</xsl:param>
+    <xsl:param name="ulink.target"></xsl:param>
+    <xsl:param name="use.viewport">0</xsl:param>
+    <!-- End of Strict Params -->
+    <xsl:param name="toc.section.depth">10</xsl:param>
+    <xsl:param name="generate.section.toc.level">10</xsl:param>
+    <!-- Enable fop extensions - see:
+    http://www.sagehill.net/docbookxsl/InstallingAnFO.html
+    http://www.mail-archive.com/fop-users%40xmlgraphics.apache.org/msg06170.html
+    -->
+    <xsl:param name="fop1.extensions">1</xsl:param>
+
+<!-- Insert some AdSense Ads -->
+<xsl:template name="user.header.navigation">
+    <!--
+    <div class="site_nav_menu">
+        <ul>
+            <li><a href="{$docmake.output.path_to_root}">Home</a></li>
+            <li><a href="{$docmake.output.path_to_root}humour/">Humour</a></li>
+            <li><a href="{$docmake.output.path_to_root}philosophy/">Articles and Essays</a></li>
+            <li><a href="{$docmake.output.path_to_root}puzzles/">Puzzles</a></li>
+            <li><a href="{$docmake.output.path_to_root}art/">Computer Art</a></li>
+        </ul>
+    </div>
+    -->
+    <div class="center ads_top"></div>
+    <xsl:if test="string($docmake.output.work_in_progress)">
+    <div class="center warning">
+        <p>
+            <b>Note:</b> This document is work-in-progress. Please don’t
+            publish it on news sites, or otherwise link to it in public
+            without the author’s permission. Private linking is acceptable.
+        </p>
+    </div>
+    </xsl:if>
+</xsl:template>
+
+<!-- Disable the title="" attribute in sections. -->
+<xsl:template name="generate.html.title">
+</xsl:template>
+
+</xsl:stylesheet>

lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5.xsl

+<?xml version='1.0' encoding='UTF-8'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
+    <xsl:param name="use.id.as.filename">1</xsl:param>
+    <xsl:param name="html.stylesheet">style.css</xsl:param>
+    <xsl:param name="itemizedlist.propagates.style">1</xsl:param>
+    <xsl:param name="chunker.output.doctype-public">-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:param>
+    <xsl:param name="chunker.output.doctype-system">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:param>
+    <!-- Parameters for Generating Strict Output. See:
+    http://www.sagehill.net/docbookxsl/OtherOutputForms.html#StrictXhtmlValid
+    -->
+    <xsl:param name="css.decoration">0</xsl:param>
+    <xsl:param name="ulink.target"></xsl:param>
+    <xsl:param name="use.viewport">0</xsl:param>
+    <!-- End of Strict Params -->
+    <xsl:param name="toc.section.depth">10</xsl:param>
+    <xsl:param name="generate.section.toc.level">10</xsl:param>
+    <!-- Enable fop extensions - see:
+    http://www.sagehill.net/docbookxsl/InstallingAnFO.html
+    http://www.mail-archive.com/fop-users%40xmlgraphics.apache.org/msg06170.html
+    -->
+    <xsl:param name="fop1.extensions">1</xsl:param>
+
+<xsl:template name="html_itemized_list">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:if test="title">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="*[not(self::listitem or self::title
+        or self::titleabbrev)]"/>
+
+    <ul>
+         <xsl:if test="@role">
+             <xsl:attribute name="class">
+                 <xsl:value-of select="@role"/>
+             </xsl:attribute>
+         </xsl:if>
+
+
+      <xsl:if test="$css.decoration != 0">
+        <xsl:attribute name="type">
+          <xsl:call-template name="list.itemsymbol"/>
+        </xsl:attribute>
+      </xsl:if>
+
+      <xsl:if test="@spacing='compact'">
+        <xsl:attribute name="compact">
+          <xsl:value-of select="@spacing"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates select="listitem"/>
+    </ul>
+  </div>
+</xsl:template>
+
+<!-- Insert some AdSense Ads -->
+<xsl:template name="user.header.navigation">
+    <!--
+    <div class="site_nav_menu">
+        <ul>
+            <li><a href="{$docmake.output.path_to_root}">Home</a></li>
+            <li><a href="{$docmake.output.path_to_root}humour/">Humour</a></li>
+            <li><a href="{$docmake.output.path_to_root}philosophy/">Articles and Essays</a></li>
+            <li><a href="{$docmake.output.path_to_root}puzzles/">Puzzles</a></li>
+            <li><a href="{$docmake.output.path_to_root}art/">Computer Art</a></li>
+        </ul>
+    </div>
+    -->
+    <div class="center ads_top"></div>
+    <xsl:if test="string($docmake.output.work_in_progress)">
+    <div class="center warning">
+        <p>
+            <b>Note:</b> This document is work-in-progress. Please don’t
+            publish it on news sites, or otherwise link to it in public
+            without the author’s permission. Private linking is acceptable.
+        </p>
+    </div>
+    </xsl:if>
+</xsl:template>
+
+<!-- Disable the title="" attribute in sections. -->
+<xsl:template name="generate.html.title">
+</xsl:template>
+
+</xsl:stylesheet>

lib/sgml/shlomif-docbook/xsl-stylesheets/rejects.xsl

+    <div class="center ads_top">
+    <script type="text/javascript">
+google_ad_client = "pub-2480595666283917";
+google_ad_width = 468;
+google_ad_height = 60;
+google_ad_format = "468x60_as";
+google_ad_type = "text";
+google_ad_channel ="";
+google_color_border = "336699";
+google_color_text = "000000";
+google_color_bg = "FFFFFF";
+google_color_link = "0000FF";
+google_color_url = "008000";
+</script>
+<script type="text/javascript"
+  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
+</script>
+    </div>
+

lib/sgml/shlomif-docbook/xsl-stylesheets/shlomif-essays-fo.xsl

+<?xml version='1.0' encoding='utf-8'?>
+<xsl:stylesheet
+     version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:fo="http://www.w3.org/1999/XSL/Format">
+    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl" />
+    <xsl:import href="shlomif-essays.xsl" />
+
+<!--colored and hyphenated links -->
+<xsl:template match="ulink">
+    <fo:basic-link external-destination="{@url}"
+         xsl:use-attribute-sets="xref.properties"
+         text-decoration="underline"
+         color="blue">
+         <xsl:choose>
+         <xsl:when test="count(child::node())=0">
+         <xsl:value-of select="@url"/>
+         </xsl:when>
+         <xsl:otherwise>
+         <xsl:apply-templates/>
+         </xsl:otherwise>
+         </xsl:choose>
+    </fo:basic-link>
+</xsl:template>
+</xsl:stylesheet>

lib/sgml/shlomif-docbook/xsl-stylesheets/shlomif-essays-xhtml-onechunk.xsl

+<?xml version='1.0' encoding='utf-8'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
+
+    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/onechunk.xsl" />
+
+    <!-- Avoid Generating a Table-of-Contents-->
+    <xsl:param name="generate.toc"></xsl:param>
+
+<!-- Disable the title="" attribute in sections. -->
+<xsl:template name="generate.html.title">
+</xsl:template>
+
+</xsl:stylesheet>
+

lib/sgml/shlomif-docbook/xsl-stylesheets/shlomif-essays-xhtml.xsl

+<?xml version='1.0' encoding='utf-8'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
+
+    <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl" />
+    <xsl:import href="shlomif-essays.xsl" />
+
+<xsl:template match="itemizedlist">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:if test="title">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="*[not(self::listitem or self::title
+        or self::titleabbrev)]"/>
+
+    <ul>
+         <xsl:if test="@role">
+             <xsl:attribute name="class">
+                 <xsl:value-of select="@role"/>
+             </xsl:attribute>
+         </xsl:if>
+
+
+      <xsl:if test="$css.decoration != 0">
+        <xsl:attribute name="type">
+          <xsl:call-template name="list.itemsymbol"/>
+        </xsl:attribute>
+      </xsl:if>
+
+      <xsl:if test="@spacing='compact'">
+        <xsl:attribute name="compact">
+          <xsl:value-of select="@spacing"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates select="listitem"/>
+    </ul>
+  </div>
+</xsl:template>
+
+</xsl:stylesheet>

lib/sgml/shlomif-docbook/xsl-stylesheets/shlomif-essays.xsl

+<?xml version='1.0' encoding='utf-8'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version='1.0'>
+    <xsl:param name="use.id.as.filename">1</xsl:param>
+    <xsl:param name="html.stylesheet">style.css</xsl:param>
+    <xsl:param name="itemizedlist.propagates.style">1</xsl:param>
+    <xsl:param name="chunker.output.doctype-public">-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:param>
+    <xsl:param name="chunker.output.doctype-system">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:param>
+    <!-- Parameters for Generating Strict Output. See:
+    http://www.sagehill.net/docbookxsl/OtherOutputForms.html#StrictXhtmlValid
+    -->
+    <xsl:param name="css.decoration">0</xsl:param>
+    <xsl:param name="ulink.target"></xsl:param>
+    <xsl:param name="use.viewport">0</xsl:param>
+    <!-- End of Strict Params -->
+    <xsl:param name="toc.section.depth">10</xsl:param>
+    <xsl:param name="generate.section.toc.level">10</xsl:param>
+    <!-- Enable fop extensions - see:
+    http://www.sagehill.net/docbookxsl/InstallingAnFO.html
+    http://www.mail-archive.com/fop-users%40xmlgraphics.apache.org/msg06170.html
+    -->
+    <xsl:param name="fop1.extensions">1</xsl:param>
+
+<xsl:template name="html_itemized_list">
+    <div xmlns="http://www.w3.org/1999/xhtml" class="{name(.)}">
+    <xsl:call-template name="anchor"/>
+    <xsl:if test="title">
+      <xsl:call-template name="formal.object.heading"/>
+    </xsl:if>
+
+    <xsl:apply-templates select="*[not(self::listitem or self::title
+        or self::titleabbrev)]"/>
+
+    <ul>
+         <xsl:if test="@role">
+             <xsl:attribute name="class">
+                 <xsl:value-of select="@role"/>
+             </xsl:attribute>
+         </xsl:if>
+
+
+      <xsl:if test="$css.decoration != 0">
+        <xsl:attribute name="type">
+          <xsl:call-template name="list.itemsymbol"/>
+        </xsl:attribute>
+      </xsl:if>
+
+      <xsl:if test="@spacing='compact'">
+        <xsl:attribute name="compact">
+          <xsl:value-of select="@spacing"/>
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:apply-templates select="listitem"/>
+    </ul>
+  </div>
+</xsl:template>
+
+<!-- Insert some AdSense Ads -->
+<xsl:template name="user.header.navigation">
+    <!--
+    <div class="site_nav_menu">
+        <ul>
+            <li><a href="{$docmake.output.path_to_root}">Home</a></li>
+            <li><a href="{$docmake.output.path_to_root}humour/">Humour</a></li>
+            <li><a href="{$docmake.output.path_to_root}philosophy/">Articles and Essays</a></li>
+            <li><a href="{$docmake.output.path_to_root}puzzles/">Puzzles</a></li>
+            <li><a href="{$docmake.output.path_to_root}art/">Computer Art</a></li>
+        </ul>
+    </div>
+    -->
+    <div class="center ads_top"></div>
+    <xsl:if test="string($docmake.output.work_in_progress)">
+    <div class="center warning">
+        <p>
+            <b>Note:</b> This document is work-in-progress. Please don’t
+            publish it on news sites, or otherwise link to it in public
+            without the author’s permission. Private linking is acceptable.
+        </p>
+    </div>
+    </xsl:if>
+</xsl:template>
+
+<!-- Disable the title="" attribute in sections. -->
+<xsl:template name="generate.html.title">
+</xsl:template>
+
+</xsl:stylesheet>

lib/sgml/shlomif-docbook/xsl-stylesheets/style.css

+a:hover { background-color : palegreen; }
+.itemizedlist ul.centralized
+{
+    text-align: center;
+    list-style-type : none;
+    font-size: large;
+}
+.center
+{
+    text-align: center;
+    margin-left: auto;
+    margin-right: auto;
+}
+.site_nav_menu
+{
+    float: left;
+    width: 15%;
+    margin-right: 1%;
+
+}
+
+div.article, div.section, div.navheader, div.ads_top
+{
+    /*
+    margin-left: 17%;
+    border-left: solid 3pt black;
+    */
+    padding-left: 0.7%;
+}
+.section .section, .article .section
+{
+      margin-left:0;
+      border-left: none;
+}
+hr
+{
+    margin-bottom:0;
+}
+.article h2, .section h2, .navheader h2
+{
+    margin-top : 0;
+    padding-top : 1em;
+}
+.navheader
+{
+    margin-bottom:0;
+}
+.warning
+{
+    margin-top: 0.5em;
+    border: double red medium;
+    width: 40em;
+}