Commits

Shlomi Fish  committed b4171b7

Converted the XHTML building to docmake.

git-svn-id: file:///home/shlomif/Backup/svn-dumps/google-code/svnsync-repos/fc-solve/trunk@1391 e7e8a897-7ba4-4ee7-b36f-f4c66519b19a

  • Participants
  • Parent commits c1d1a8c

Comments (0)

Files changed (4)

File fc-solve/arch_doc/docbook/Makefile

 DOC = fcs_arch_doc
+XML = $(DOC).xml
+XHTML = $(DOC)
+XHTML_INDEX = $(XHTML)/index.html
 
 UPLOAD_PATH = shlomif@shell.berlios.de:/home/groups/fc-solve/htdocs/arch_doc/
 
-include docmake.mak
+all: xhtml
 
+xhtml: $(XHTML_INDEX)
+
+$(XHTML_INDEX): $(XML)
+	docmake \
+		--stringparam "docmake.output.format=xhtml" \
+		--stringparam "docmake.output.work_in_progress=" \
+		-x shlomif-essays-xhtml.xsl	\
+		-o $(XHTML) \
+		xhtml $<
+
+%.show:
+	@echo "$* = $($*)"

File fc-solve/arch_doc/docbook/fcs_arch_doc.xml

 
         <legalnotice>
             <!-- Ci vis pacem -->
-            <para>
+            <para>              
                 <!-- belum. ;-) -->
-                This document is copyrighted by Shlomi Fish 
-                under the terms of the Open Publication License version 2.0 or
-                greater.
+                This work is licensed under the 
+                <ulink url="http://creativecommons.org/licenses/by/3.0/">Creative 
+                    Commons Attribution 3.0 Unported License</ulink> (or at 
+                your option a greater version of it).
+            </para>
+            <para>
+                It was written by
+                <ulink url="http://www.shlomifish.org/">Shlomi Fish</ulink>, 
+                and one should attribute a derived work to him, while linking
+                to his homepage.
             </para>
         </legalnotice>
         <revhistory>

File fc-solve/arch_doc/docbook/shlomif-essays-xhtml.xsl

+<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>

File fc-solve/arch_doc/docbook/shlomif-essays.xsl

+<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">
+    <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>
+    <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>
+
+</xsl:stylesheet>