]> granicus.if.org Git - docbook-dsssl/commitdiff
Added special case for maketoc.xsl. Literal tocentry elements need the d: prefix.
authorMauritz Jeanson <mj@johanneberg.com>
Thu, 23 Oct 2008 19:44:12 +0000 (19:44 +0000)
committerMauritz Jeanson <mj@johanneberg.com>
Thu, 23 Oct 2008 19:44:12 +0000 (19:44 +0000)
releasetools/xslns-build

index 4b3fe827efb234ac4d7045ba64cb8cbc91a5dedd..80d20954489072e675190fee7e3741b242e4fdfe 100755 (executable)
@@ -1,15 +1,15 @@
 #!/usr/bin/perl -w -- #  -*- Perl -*-
 #
-#  makedb5xsl.pl - generate a parallel set of DocBook5 namespaced 
+#    xslns-build - generate a parallel set of DocBook5 namespaced 
 #                  stylesheet directories from a directory of
 #                  non-namespaced stylesheets.
 #
 # $Id$
 #
 
-my $Usage = '
+my $Usage = "
 USAGE:
-  makedb5xsl input-dir output-dir
+  $0 input-dir output-dir
 
   where:
     input-dir  is the directory containing non-namespaced stylesheets
@@ -17,7 +17,7 @@ USAGE:
 
   Note: an existing output-dir will be completely removed
         before creating new output.
-';
+";
 
 #######################################################
 # Modules to use
@@ -271,7 +271,12 @@ sub nsfilter {
   else {
     s|(<xsl:stylesheet)|$1 exclude-result-prefixes="d"\n                |s;
   }
-  
+
+  # Add d: prefix to literal tocentry in maketoc.xsl
+  if ($infile =~ "maketoc") {
+    s/(<\/?)(tocentry)/$1d:$2/sg;
+  }
+
   # Process certain XSL attributes to add d: namespace if needed
   # and output everything using this while loop.