Commits

Shlomi Fish committed 37bbc41

Not working - for review.

  • Participants
  • Parent commits 8e399f9
  • Branches adding_toc_before_bad_elements_intoroduction

Comments (0)

Files changed (2)

 
 # -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)
+# saxon -s:$< -o:$(DOCBOOK5_XSL_STYLESHEETS_PATH)/$@.temp.xml -xsl:$(DOCBOOK5_XSL_ONECHUNK_XSLT_STYLESHEET) root.filename=$@.temp.xml
+#
+
+FROM_DB5_TEMP_SUFFIX = temp.xml
+BAD_ELEMENTS_XHTML_TEMP := $(BAD_ELEMENTS_XHTML).$(FROM_DB5_TEMP_SUFFIX)
+
+$(BAD_ELEMENTS_XHTML_TEMP): $(BAD_ELEMENTS_DB5) $(DOCBOOK5_XSL_ONECHUNK_XSLT_STYLESHEET)
 	jing $(DOCBOOK5_RELAXNG) $<
-	docmake --stringparam "root.filename=$@.temp.xml" --basepath $(DOCBOOK5_XSL_STYLESHEETS_PATH) -x $(DOCBOOK5_XSL_ONECHUNK_XSLT_STYLESHEET) xhtml-1_1 $<
-	xsltproc --output $@ ./bin/clean-up-docbook-xhtml-1.1.xslt $@.temp.xml.html
-	rm -f $@.temp.xml.html
+	docmake -v --stringparam "root.filename=$@.$(FROM_DB5_TEMP_SUFFIX)" --basepath $(DOCBOOK5_XSL_STYLESHEETS_PATH) -x $(DOCBOOK5_XSL_ONECHUNK_XSLT_STYLESHEET) xhtml-1_1 $<
+
+$(BAD_ELEMENTS_XHTML): $(BAD_ELEMENTS_XHTML_TEMP)
+	xsltproc --output $@ ./bin/clean-up-docbook-xhtml-1.1.xslt $<
 	perl -lpi -e 's/[ \t]+\z//' $@
 
 $(DOCBOOK5_RENDERED_DIR)/%.xhtml: $(DOCBOOK5_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.xhtml

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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:db="http://docbook.org/ns/docbook" xmlns:vrd="http://www.shlomifish.org/open-source/projects/XML-Grammar/Vered/" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xhtml="http://www.w3.org/1999/xhtml">
 
+
+    <xsl:import href="shlomif-essays-5-xhtml-common.xsl" />
+    <xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/chunk.xsl" />
     <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" />
+    <xsl:import href="http://docbook.sourceforge.net/release/xsl-ns/current/xhtml-1_1/docbook.xsl" />
+
 
     <!-- Avoid Generating a Table-of-Contents-->
-    <xsl:param name="generate.toc"></xsl:param>
+    <xsl:param name="generate.toc">
+        article toc
+    </xsl:param>
 
 <!-- Disable the title="" attribute in sections. -->
 <xsl:template name="generate.html.title">
 </xsl:template>
 
+<xsl:template match="db:article">
+    <xsl:call-template name="id.warning"/>
+
+    <xsl:if test="false()">
+    </xsl:if>
+
+    <xsl:element name="xhtml:div">
+        <xsl:call-template name="common.html.attributes">
+            <xsl:with-param name="inherit" select="1"/>
+        </xsl:call-template>
+        <xsl:call-template name="id.attribute">
+            <xsl:with-param name="conditional" select="0"/>
+        </xsl:call-template>
+
+        <xsl:call-template name="article.titlepage"/>
+        <xsl:variable name="toc.params">
+            <xsl:call-template name="find.path.params">
+                <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
+            </xsl:call-template>
+        </xsl:variable>
+
+        <xsl:call-template name="make.lots">
+            <xsl:with-param name="toc.params" select="$toc.params"/>
+            <xsl:with-param name="toc">
+                <xsl:call-template name="component.toc">
+                    <xsl:with-param name="toc.title.p" select="contains($toc.params, 'title')"/>
+                </xsl:call-template>
+            </xsl:with-param>
+        </xsl:call-template>
+        <xsl:element name="xhtml:h1">
+            <xsl:attribute name="xhtml:style">
+                <xsl:text>color: red</xsl:text>
+            </xsl:attribute>
+            <xsl:text>Foobar.</xsl:text>
+        </xsl:element>
+    </xsl:element>
+
+    <xsl:if test="false()">
+        <xhtml:h1 style="color:red">Hello Plakokok:W</xhtml:h1>
+        <xsl:apply-templates/>
+        <xsl:call-template name="process.footnotes"/>
+    </xsl:if>
+</xsl:template>
+
 </xsl:stylesheet>