diff --git a/LDP/builder/dsssl/ldp.dsl b/LDP/builder/dsssl/ldp.dsl index d3f5927c..984e75e4 100644 --- a/LDP/builder/dsssl/ldp.dsl +++ b/LDP/builder/dsssl/ldp.dsl @@ -19,7 +19,7 @@ ;; ------------------------------------------------------------------------ ;; ldp.dsl - LDP Customized DSSSL Stylesheet -;; v1.11, 2003-02-03 +;; v1.12, 2003-03-19 ;; Copyright (C) 2000-2003 ;; ;; This program is free software; you can redistribute it and/or modify @@ -116,6 +116,7 @@ (normalize "edition") (normalize "pubdate") (normalize "copyright") + (normalize "isbn") (normalize "abstract") (normalize "legalnotice") (normalize "revhistory"))) @@ -142,6 +143,10 @@ ;; for redhat "UNREGISTERED::James Clark//Flow Object Class::element") +(define %html-pubid% + ;; put the public identifier in each HTML file + "-//W3C//DTD HTML 4.0 Transitional//EN") + (define %generate-legalnotice-link% ;; put the legal notice in a separate file #t) @@ -232,6 +237,7 @@ (normalize "authorgroup") (normalize "author") (normalize "othercredit") + (normalize "contrib") (normalize "edition") (normalize "releaseinfo") (normalize "publisher") diff --git a/LDP/builder/ldp_mk b/LDP/builder/ldp_mk index fecef938..c1038423 100644 --- a/LDP/builder/ldp_mk +++ b/LDP/builder/ldp_mk @@ -31,16 +31,14 @@ if($ARGV[0] eq '') { exit(0); } -my($_toolroot) = $ENV{'SGML_TOOLROOT'} || - '/export/sunsite/users/gferg/toolroot'; -my($_jade) = 'jade-1.2.1'; -my($dtd) = 'SGML'; -my($dcl) = ''; -my($linuxdoc) = 1; -my($create_index) = 0; -my($html_only) = 0; +my($_toolroot)=$ENV{'SGML_TOOLROOT'} || '/export/sunsite/users/gferg/toolroot'; +my($_jade) = 'jade-1.2.1'; +my($dtd) = 'SGML'; +my($dcl) = ''; +my($linuxdoc) = 1; +my($create_index, $html_only, $ldpwn) = 0; my($cmd, $fname, $fname_wo_ext, $txt_filter, $style, $db_style, $s, $db_v, $x) = ''; -my(@flines) = (); +my(@flines) = (); while(1) { @@ -58,6 +56,9 @@ while(1) { } elsif ($ARGV[0] =~ /^\-html/) { shift(@ARGV); $html_only = 1; + } elsif ($ARGV[0] =~ /^\-ldpwn/) { + shift(@ARGV); + $ldpwn = 1; } else { last; } @@ -80,7 +81,11 @@ if( !(-e "$fname") ) { } if( $style eq '' ) { - $style = "$_toolroot/dsssl/docbook/html/ldp.dsl#html"; + if ($ldpwn == 1) { + $style = "$_toolroot/dsssl/docbook/html/ldpwn.dsl"; + } else { + $style = "$_toolroot/dsssl/docbook/html/ldp.dsl#html"; + } } $db_style = "$_toolroot/dsssl/docbook/html/docbook.dsl"; @@ -138,7 +143,7 @@ if( $s =~ /linuxdoc/i ) { $ENV{'SGML_CATALOG_FILES'} = $s; } - if( !(-d "$fname_wo_ext") ) { + if( !(-d "$fname_wo_ext") && $ldpwn == 0 ) { mkdir("$fname_wo_ext", 0755); } @@ -174,22 +179,26 @@ print "\nldp_mk: creating HTML from $fname...\n"; if( $linuxdoc == 1 ) { - ## $cmd = "sgml2html -c latin $fname"; - $cmd = "sgml2html -c ascii $fname"; + ## $cmd = "$_toolroot/linuxdoc-tools/bin/sgml2html -c latin $fname"; + $cmd = "$_toolroot/linuxdoc-tools/bin/sgml2html -c ascii $fname"; } else { $cmd = "jade -t sgml -i html -d $style $dcl $fname; " . - "mv -f \*.html $fname_wo_ext/;" . + "mv -f \*.htm\* $fname_wo_ext/;" . "jade -t sgml -i html -V nochunks " . "-d $style $dcl $fname > 00_${fname_wo_ext}.html"; + + if( $ldpwn == 1 ) { + $cmd = "jade -t sgml -i html -d $style $dcl $fname > 00_${fname_wo_ext}.html "; + } } system($cmd); if( ($linuxdoc == 1 && !(-e "$fname_wo_ext.html")) || - ($linuxdoc == 0 && !(-e "$fname_wo_ext/index.html")) ) { + ($linuxdoc == 0 && !(-e "00_${fname_wo_ext}.html")) ) { print "\nldp_mk: WARNING - could not create HTML: $fname_wo_ext\n"; } @@ -205,7 +214,7 @@ print "\nldp_mk: creating plain text from $fname...\n"; if( $linuxdoc == 1 ) { - $cmd = "sgml2txt -c latin -f $fname"; + $cmd = "$_toolroot/linuxdoc-tools/bin/sgml2txt -c latin -f $fname"; } else { @@ -290,6 +299,47 @@ if( -e "$fname_wo_ext.txt" ) { print "\nldp_mk: WARNING - could not create TXT: $fname_wo_ext.txt\n"; } +if ($ldpwn == 1) { + + system("mv -f 00_${fname_wo_ext}.html ${fname_wo_ext}.html"); + + # create rss feed + # + open(NFILE, "+< ${fname_wo_ext}.html") || + die "ldp_mk: cannot open ${fname_wo_ext}.html $!\n"; + @flines = ; + for ($i=0; $i < (@flines + 0); $i++) { + + if ($flines[$i] =~ /
  • <\/li/i) { + + $flines[$i] = "