Commits

shl...@cec68495-dca5-4e2b-845c-11fdaaa4f967  committed 9d3f10e

Got the DocBook to work properly.

  • Participants
  • Parent commits 9501d80

Comments (0)

Files changed (3)

 
 DOCS_COMMON_DEPS = template.wml lib/MyNavData.pm
 
-all: latemp_targets fortunes-target sitemap_targets copy_fortunes site-source-install 
+all: docbook_targets latemp_targets fortunes-target sitemap_targets copy_fortunes site-source-install 
 	
 include include.mak
 include rules.mak
 $(SITE_SOURCE_INSTALL_TARGET): INSTALL
 	cp -f $< $@
 
+docbook_targets: lib/docbook/rendered/intro-prog-lang.html
+
+lib/docbook/rendered/intro-prog-lang.html: lib/docbook/essays/introductory-language/intro-lang-all-in-one.html
+	./bin/clean-up-docbook-xsl-xhtml.pl $< > $@
+
 %.show:
 	@echo "$* = $($*)"
 

File bin/clean-up-docbook-xsl-xhtml.pl

     }
 }
 
+# Remove the Author one - they confuse the ToC API.
+{
+    my @nodes = $xpc->findnodes(q{//xhtml:h3[@class = 'author']});
+    foreach my $node (@nodes)
+    {
+         my $container = $node->parentNode();
+         $container->removeChild($node);
+    }
+}
 {
     my ($body_node) = $xpc->findnodes('//xhtml:body');
 

File t2/philosophy/computers/education/introductory-language/index.html.wml

 #include '../template.wml'
+#include "xhtml/1.x/std/toc.wml"
 
-<latemp_subject "Toughts about the Best Introductory Language" />
+<latemp_subject "Thoughts about the Best Introductory Language" />
 
-<h2 style="clear:right;">The Article Itself</h2>
-<:{
-if (system(
-    "../bin/clean-up-docbook-xsl-xhtml.pl",
-    "../lib/docbook/essays/introductory-language/intro-lang-all-in-one.html",
-    ))
-{
-    die "system failed";
-}
-}:>
+<h2 id="main_intro">Introduction</h2>
 
-<h2>Other Formats</h2>
+<p>
+What makes programming languages are suitable or unsuitable as introductory
+languages? Which languages are better learnt first and at which order? And
+why what the masses think is the most suitable introductory programming 
+language is not in fact that.
+</p>
+
+<p>
+This paper examines several approaches to which programming language is the
+best, and afterwards gives several useful relations for which languages
+should come first. Finally it gives a final verdict, defends it and then
+gives some other good food for thought.
+</p>
+
+<h2*>Table of Contents</h2*>
+
+<toc />
+
+<h2 id="itself" style="clear:right;">The Article Itself</h2>
+
+#include "../lib/docbook/rendered/intro-prog-lang.html"
+
+<h2 id="other_formats">Other Formats</h2>
 
 <ul>
 <li>