Commits

Shlomi Fish committed 4f1e013

Finally got the DocBook/XSLT to work.

We now propagate the DocBook/5 role="..." attribute to XHTML classes.

  • Participants
  • Parent commits 2c83b49

Comments (0)

Files changed (3)

 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/index.html
+BAD_ELEMENTS_XHTML_DIR = lib/tutorials/bad-elements/bad-elements.xhtml
+BAD_ELEMENTS_XHTML = $(BAD_ELEMENTS_XHTML_DIR)/index.html
 
 bad_elements_html: $(BAD_ELEMENTS_XHTML)
 
 # -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 $<
+	docmake --basepath $(HOME)/Download/unpack/file/docbook/docbook-xsl-ns-snapshot -x lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-xhtml-onechunk.xsl -o $(BAD_ELEMENTS_XHTML_DIR) xhtml-1_1 $<

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

 
     </xsl:template>
     -->
+
+<!-- Apply the roles into classes -->
+<xsl:template match="*[@role]" mode="class.value">
+    <xsl:param name="class" select="meaningless"/>
+    <xsl:value-of select="@role"/>
+</xsl:template>
+
+<!--
+For debugging:
+
+<xsl:template match="*" mode="class.value">
+    <xsl:param name="class" select="local-name(.)"/>
+    <xsl:text>I am now crazy, I just think I ARE</xsl:text>
+</xsl:template>
+For debugg
+-->
 </xsl:stylesheet>

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

 <xsl:template name="generate.html.title">
 </xsl:template>
 
-<!-- Apply the roles -->
-<xsl:template match="*[@role]" mode="class.value">
-    <xsl:value-of select="@role"/>
-</xsl:template>
+<!--
 
+WARNING: this page is not used by
+lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-xhtml-onechunk.xsl
+so it should not be modified - instead see:
+lib/sgml/shlomif-docbook/xsl-5-stylesheets/shlomif-essays-5-xhtml-common.xsl
+
+-->
 </xsl:stylesheet>