DocBook XSLT 2.0 Stylesheet output: programlisting.009.xml

Expected (5 differences)Actual (1 differences)
<html>
   <head>
      <link href="../../resources/css/db-prism.css" rel="stylesheet" type="text/css"/>
      <link href="../../resources/css/default.css" rel="stylesheet" type="text/css"/>
      <link href="../../resources/css/prism.css" rel="stylesheet" type="text/css"/>
      <meta charset="utf-8"/>
      <meta content="DocBook XSL 2.0 Stylesheets Vxxx" name="generator"/>
      <script src="../../resources/js/dbmodnizr.js" type="text/javascript"/>
      <title>Article wrapper</title>
   </head>
   <body>
      <article class="article" id="R.1">
         <header class="article-titlepage">
            <h2>Article wrapper</h2>
         </header>
         <pre class="programlisting language-none line-numbers">
            <code>#!/usr/bin/perl -- # --*-Perl-*--

use Getopt::Std;

$usage = "Usage: $0 [-q] [-u|-p|-m] file [ file ... ]\n";

die $usage if ! getopts('qupm');

die $usage if ($opt_p + $opt_u + $opt_m) != 1;

$file = shift @ARGV || die $usage;

$opt = '-u' if $opt_u;
$opt = '-p' if $opt_p;
$opt = '-m' if $opt_m;</code>
         </pre>
         <p>This paragraph interrupts the listing. The line numbering
continues in the following listing.
</p>
         <pre class="programlisting language-none line-numbers" data-start="16">
            <code>while ($file) {
    print "Converting $file to $opt linebreaks.\n" if !$opt_q;
    open (F, "$file");
    binmode F;
    read (F, $_, -s $file);
    close (F);

    s/\r\n/\n/sg;
    s/\r/\n/sg;

    if ($opt eq '-p') {
	s/\n/\r\n/sg;
    } elsif ($opt eq '-m') {
	s/\n/\r/sg;
    }

    open (F, ">$file");
    binmode F;
    print F $_;
    close (F);

    $file = shift @ARGV;
}</code>
         </pre>
      </article>
      <script src="../../resources/js/prism.js"/>
   </body>
</html>
<html>
   <head>
      <link href="../../resources/css/db-prism.css" rel="stylesheet" type="text/css"/>
      <link href="../../resources/css/default.css" rel="stylesheet" type="text/css"/>
      <link href="../../resources/css/prism.css" rel="stylesheet" type="text/css"/>
      <meta charset="utf-8"/>
      <meta content="DocBook XSL 2.0 Stylesheets Vxxx" name="generator"/>
      <script src="../../resources/js/dbmodnizr.js" type="text/javascript"/>
      <title>Article wrapper</title>
   </head>
   <body>
      <article class="article" id="R.1">
         <header class="article-titlepage">
            <h2>Article wrapper</h2>
         </header>
         <div class="content">
            <pre class="programlisting language-none line-numbers">
               <code>#!/usr/bin/perl -- # --*-Perl-*--

use Getopt::Std;

$usage = "Usage: $0 [-q] [-u|-p|-m] file [ file ... ]\n";

die $usage if ! getopts('qupm');

die $usage if ($opt_p + $opt_u + $opt_m) != 1;

$file = shift @ARGV || die $usage;

$opt = '-u' if $opt_u;
$opt = '-p' if $opt_p;
$opt = '-m' if $opt_m;</code>
            </pre>
            <p>This paragraph interrupts the listing. The line numbering
continues in the following listing.
</p>
            <pre class="programlisting language-none line-numbers" data-start="16">
               <code>while ($file) {
    print "Converting $file to $opt linebreaks.\n" if !$opt_q;
    open (F, "$file");
    binmode F;
    read (F, $_, -s $file);
    close (F);

    s/\r\n/\n/sg;
    s/\r/\n/sg;

    if ($opt eq '-p') {
	s/\n/\r\n/sg;
    } elsif ($opt eq '-m') {
	s/\n/\r/sg;
    }

    open (F, ">$file");
    binmode F;
    print F $_;
    close (F);

    $file = shift @ARGV;
}</code>
            </pre>
         </div>
      </article>
      <script src="../../resources/js/prism.js"/>
   </body>
</html>
The “current” CSS styling is applied to the this entire document; the results in this column may be anomalous. Also, image links are broken in this column. 

Article wrapper

#!/usr/bin/perl -- # --*-Perl-*--

use Getopt::Std;

$usage = "Usage: $0 [-q] [-u|-p|-m] file [ file ... ]\n";

die $usage if ! getopts('qupm');

die $usage if ($opt_p + $opt_u + $opt_m) != 1;

$file = shift @ARGV || die $usage;

$opt = '-u' if $opt_u;
$opt = '-p' if $opt_p;
$opt = '-m' if $opt_m;

This paragraph interrupts the listing. The line numbering continues in the following listing.

while ($file) {
    print "Converting $file to $opt linebreaks.\n" if !$opt_q;
    open (F, "$file");
    binmode F;
    read (F, $_, -s $file);
    close (F);

    s/\r\n/\n/sg;
    s/\r/\n/sg;

    if ($opt eq '-p') {
	s/\n/\r\n/sg;
    } elsif ($opt eq '-m') {
	s/\n/\r/sg;
    }

    open (F, ">$file");
    binmode F;
    print F $_;
    close (F);

    $file = shift @ARGV;
}

Article wrapper

#!/usr/bin/perl -- # --*-Perl-*--

use Getopt::Std;

$usage = "Usage: $0 [-q] [-u|-p|-m] file [ file ... ]\n";

die $usage if ! getopts('qupm');

die $usage if ($opt_p + $opt_u + $opt_m) != 1;

$file = shift @ARGV || die $usage;

$opt = '-u' if $opt_u;
$opt = '-p' if $opt_p;
$opt = '-m' if $opt_m;

This paragraph interrupts the listing. The line numbering continues in the following listing.

while ($file) {
    print "Converting $file to $opt linebreaks.\n" if !$opt_q;
    open (F, "$file");
    binmode F;
    read (F, $_, -s $file);
    close (F);

    s/\r\n/\n/sg;
    s/\r/\n/sg;

    if ($opt eq '-p') {
	s/\n/\r\n/sg;
    } elsif ($opt eq '-m') {
	s/\n/\r/sg;
    }

    open (F, ">$file");
    binmode F;
    print F $_;
    close (F);

    $file = shift @ARGV;
}

XML source