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 42 43 44 45 46 47 48
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>6.
Prerequisites
</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"><link rel="start" href="index.html" title="
The xmlformat XML Document Formatter
"><link rel="up" href="index.html" title="
The xmlformat XML Document Formatter
"><link rel="prev" href="how-xmlformat-works.html" title="5.
How xmlformat Works
"><link rel="next" href="references.html" title="7.
References
"></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">6.
Prerequisites
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="how-xmlformat-works.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="references.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="prerequisites"></a>6.
Prerequisites
</h2></div></div></div><p>
<span><strong class="command">xmlformat</strong></span> has very few prerequisites. It requires no
extra modules other than an option-processing module. In particular:
</p><div class="itemizedlist"><ul type="disc"><li><p>
<span><strong class="command">xmlformat</strong></span> requires no XML processing modules. XML
parsing is done with a single (rather complex) regular expression
developed by Robert D. Cameron. A paper that discusses development of
this parsing expression is available; see <a href="references.html" title="7.
References
">Section 7, “
References
”</a>.
</p></li><li><p>
<span><strong class="command">xmlformat</strong></span> requires no text-processing modules such as
Text::Wrap. I tested Text::Wrap to see if it was suitable for
<span><strong class="command">xmlformat</strong></span>. It was not, for the following reasons:
</p><div class="itemizedlist"><ul type="circle"><li><p>
If Text::Wrap encounters an individual word that is longer than the line
length, older versions of Text::Wrap invoke die(). In newer versions,
you can have long words left intact.
</p></li><li><p>
Text::Wrap converts runs of spaces in the leading indent to tabs.
(Though this can be suppressed.)
</p></li><li><p>
Text::Wrap reformats inline tags (and may change attribute values).
<span><strong class="command">xmlformat</strong></span> preserves tags intact.
</p></li></ul></div><p>
In addition, the simple algorithm used by <span><strong class="command">xmlformat</strong></span>
appears to be about twice as fast as Text::Wrap (at least on Mac OS X).
</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="how-xmlformat-works.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="references.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">5.
How <span><strong class="command">xmlformat</strong></span> Works
</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 7.
References
</td></tr></table></div></body></html>
|