Commits

Shlomi Fish committed 4f1e013

Finally got the DocBook/XSLT to work.

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

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

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>

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>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.