blob: 02d2510d895dd8ba8219b42a95d15a6a3259ecfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter 2. Saxon Extensions</title><link rel="stylesheet" href="reference.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V2"><link rel="home" href="index.html" title="DocBook XSL Stylesheet Documentation"><link rel="up" href="index.html" title="DocBook XSL Stylesheet Documentation"><link rel="previous" href="ch01s04.html" title="Customizing DocBook XSL stylesheets"><link rel="next" href="ch02s02.html" title="Using the Extensions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. Saxon Extensions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s04.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch02s02.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="d0e893"></a>Chapter 2. Saxon Extensions</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="extensions.html#d0e937">Installation</a></dt><dt><a href="ch02s02.html">Using the Extensions</a></dt></dl></div><p>Beginning with release 1.25, the DocBook XSL Stylesheets include
a set of Java extensions for Saxon.</p><p>These extensions enable callouts, numbered program listings, and
the direct inclusion of text:</p><div class="programlistingco"><pre class="programlisting"> 1 @rem = '--*-Perl-*-- <span class="co"><img src="images/callouts/1.png" alt="(1)"></span>
@echo off
perl.exe %_batchname %$
goto endofperl <span class="co"><img src="images/callouts/2.png" alt="(2)"></span>
5 @rem ';
# Compress mail...
require 'n:/home/nwalsh/lib/cygnus.pl'; <span class="co"><img src="images/callouts/3.png" alt="(3)"></span>
10 require 'timelocal.pl'; <span class="co"><img src="images/callouts/3.png" alt="(3)"></span>
use Cwd; <span class="co"><img src="images/callouts/4.png" alt="(4)"></span>
select (STDERR); $| = 1;
select (STDOUT); $| = 1;
15
@DIRS = ("/home/nwalsh/Mail");
while (@DIRS) {
$dir = shift @DIRS;
opendir (DIR, $dir);
20 while ($fname = readdir(DIR)) {
$file = "$dir/$fname";
next if ! -d $file;
next if $fname =~ /^\.\.?$/;
25 print "$file\n";
push (@DIRS, $file);
&compress ($file); <span class="co"><img src="images/callouts/5.png" alt="(5)"></span>
}
}
30
exit;</pre><div class="calloutlist"><a name="d0e912"></a><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><a name="d0e913"></a><img src="images/callouts/1.png" alt="1" border="0"></td><td valign="top" align="left"><p>The prologue handles embedding a Perl script in a DOS batch file.</p></td></tr><tr><td width="5%" valign="top" align="left"><a name="d0e916"></a><img src="images/callouts/2.png" alt="2" border="0"></td><td valign="top" align="left"><p>The <tt>goto</tt> statement, interpreted by the DOS batch
file interpreter, skips over the body of the Perl script.</p></td></tr><tr><td width="5%" valign="top" align="left"><a name="d0e922"></a><img src="images/callouts/3.png" alt="3" border="0"></td><td valign="top" align="left"><p>The <tt>require</tt> statement sources in external program
fragments.</p></td></tr><tr><td width="5%" valign="top" align="left"><a name="d0e928"></a><img src="images/callouts/4.png" alt="4" border="0"></td><td valign="top" align="left"><p>The <tt>use</tt> statement is similar, but has additional
utility. It is a Perl5 function. (Note that this callout area specifies
both a line and a column.)</p></td></tr><tr><td width="5%" valign="top" align="left"><a name="d0e934"></a><img src="images/callouts/5.png" alt="5" border="0"></td><td valign="top" align="left"><p>This is a user subroutine call.</p></td></tr></table></div></div><div class="section"><a name="d0e937"></a><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e937"></a>Installation</h2></div></div><p>The extensions are included in the distribution in
<tt>extensions/nwalsh.jar</tt>. Just make sure that jar
file is in your CLASSPATH when you run Saxon.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s02.html">Next</a></td></tr><tr><td width="40%" align="left">Customizing DocBook XSL stylesheets </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> Using the Extensions</td></tr></table></div></body></html>
|