xhtmlpp - The XHTML Preprocessor
Xhtmlpp is a pre-processor for XHTML documents.
XHtmlpp stands for XHTML Pre Processor. It also stands for
eXtended HTMLPP, because it is an extention of htmlpp,
designed to cope gracefully with XHTML.
What is xhtmlpp?
- Xhtmlpp is a pre-processor for XHTML documents.
- Its purpose is to simplify the work of writing and packaging large
numbers of XHTML documents.
- It acts like a compiler: you provide an input source text
and xhtmlpp produces the XHTML documents from that. This is easier and
safer than trying to edit and manage separate XHTML documents.
- To use xhtmlpp, you should be comfortable writing XHTML without help
from a special XHTML editor. This is not usually a problem, since XHTML
is a simple language.
- Xhtmlpp is free software written in Perl,
based on htmlpp 4.2a from iMatix.
It is distributed with full sources according to the
GNU General Public License.
What does xhtmlpp do?
- It can break one input source text file into several XHTML documents.
If you want to edit a larger file (because it is faster and
easier), but provide the information in smaller pieces on-line (people
can access it easier). Xhtmlpp makes this possible.
- Contrariwise, it can combine several input source files
into one XHTML document, which is helpful if you have
multiple sources for your documents.
- It lets you define symbols like version in one place, then
use these in the text like this: $(version) so that you can
make changes in a single place only, not throughout the text.
- It creates tables of contents, and links to chain pages together in
sequence.
- It adds headers and footers to pages, so that you can keep a
consistent style in all XHTML pages.
- It lets you define macros to simplify XHTML markup.
- It converts plain text into XHTML using guru mode.
- It converts accented characters into XHTML metacharacters.
- It allows you to embed Perl code and to include the output of any
external program into the page.
- It queries flat-text databases.
- It provides features to build multilingual sites.
- It provides many built-in functions to simplify XHTML writing, like
calculating image dimensions, file sizes, working with dates, etc.
How do I use xhtmlpp?
- Take a look at xhtmlpp.xhp, which is the documentation source
for xhtmlpp's own on-line documentation. This is the main example for
xhtmlpp.
- Edit the source text using any text editor, then run xhtmlpp on the
source. It produces a number of XHTML files (extension .htm) which you
can test using a browser.
- In general, xhtmlpp generates XHTML pages that use relative
addressing, so that pages refer to each other without specifying a
host or path. This allows you to test and use the XHTML pages on a local
hard disk.
Where do I get xhtmlpp?
What else do I need?
- Xhtmlpp uses Perl 5. It does not use any system-specific
features, so will probably run on any box, but this version has only
been tested under UNIX (RedHat 7.1 Linux, to be precise).
- Perl is a programming language written by Larry Wall that is freely
available for many platforms. If you never installed or used Perl, this
is an excellent time to start.
- Xhtmlpp also uses the perl module Image::Size, which you can
download from cpan.
What Are The Alternatives?