1. Shlomi Fish
  2. Docmake

Commits

shl...@52c325ad-5fd0-0310-8a0f-c43feede02cc  committed cd442d2

Got the xhtml mode to work.

  • Participants
  • Parent commits 073d733
  • Branches default

Comments (0)

Files changed (2)

File modules/App-XML-DocBook-Docmake/bin/docmake

View file
  • Ignore whitespace
 
 use App::XML::DocBook::Docmake;
 
-my $docmake = App::XML::DocBook::Docmake->new();
+my $docmake = App::XML::DocBook::Docmake->new({argv => [@ARGV]});
 
-exit($docmake->run({argv => [@ARGV]}));
+exit($docmake->run());
 

File modules/App-XML-DocBook-Docmake/lib/App/XML/DocBook/Docmake.pm

View file
  • Ignore whitespace
     _input_path
     _mode
     _output_path
+    _verbose
 ));
 
 =head1 SYNOPSIS
     my $argv = $args->{'argv'};
 
     my $output_path;
+    my $verbose = 0;
 
     my $ret = GetOptionsFromArray($argv,
         "o=s" => \$output_path,
+        "v|verbose" => \$verbose,
     );
 
     $self->_output_path($output_path);
+    $self->_verbose($verbose);
 
     my $mode = shift(@$argv);
 
-    if ($mode eq "html")
+    if ($mode eq "xhtml")
     {
         $self->_mode($mode);
     }
 {
     my $self = shift;
 
-    return system("xsltproc",
+    my @cmd = ("xsltproc",
         "-o", $self->_output_path(),
-        "docbook-xsl/html/docbook.xsl",
+        "http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl",
         $self->_input_path(),
-    );  
+    );
+
+    if ($self->_verbose())
+    {
+        print (join(" ", @cmd), "\n");
+    }
+
+    return system(@cmd);
 }