XML PreProcessor (XPP) v0.9

1. What's the XPP?

The XML PreProcessor is a simple Perl script that can simplify handtyping of XML code without any XML-compliant editor.

  1. It makes XML handtyping easier by avoiding the necessity of the proper start-tag/end-tag pair nesting by replacing the start/end-tag pair with simple curly brackets { } as in usual programming languages.
  2. More specifically, it reduces the annoying verbosity of XSLT language by providing shortcuts for some frequently used constructs in XSLT. Also, the "name", "select" and "match" attribute specification on xsl elements can be written shorter.
  3. In addition, XPP speeds up creation of (X)HTML files by abbreviating the "class" and "id" attribute specifications.
The basic idea of XPP is similar to the more advanced XSLScript by Paul Tchistopolskii. I decided to keep the things a bit simpler, so in XPP, there are no XSLT-specific features except of a very few shortcuts for writting XSLT elements and attrs.

2. Terms of Use

See the license.txt file for the license conditions.

3. Requirements

The XPP needs a Perl5 interpreter to be installed on your computer. The Perl is available for all common platform. However, it is not distributed directly with XPP and must be downloaded separately. You can check out http://www.perl.org for more details on downloading Perl for the desired platform.

4. Installing XPP

  1. Download the current xpp-0.9.zip package.
  2. Simply upzip the downloaded file to the desired directory. You can add the directory to the PATH.
  3. Also, you should edit the first lines of "xpp.pl" in order to specify the location of the template files and the default output encoding. On UNIX, you can specify the path to the Perl interpreter on the first line of "xpp.pl" like:
    #!/usr/bin/perl
    
  4. (Don't forget to make the xpp.pl executable ("x" attribute) on UNIX systems if you want to run it like this.)
  5. You can also rename the script file as you like...

5. Running XPP

On all platforms:
	[perl] xpp.pl [-ttemplate] inputfile

where "template" is the name (without extension) of the desired output file template (located in the directory specified at the beginning of the "xpp.pl" file. The extension ".xpt" is added automatically. If you don't like this behavior, edit the "xpp.pl" accordingly :-)
If you don't specify the template file, a standard (empty) one will be used.
Example for Windows (Perl is on the PATH and "\xpp" is the current directory):
	perl xpp.pl -txhtml1-transitional examples\in1.xsp > examples\out1.html

This will produce a XHTML (Strict) output file "examples\out1.html" from the "examples\in1.xsp" input file.
For writting the input files as well as the templates, see the manual.txt.

6. Configuration

7. Support

If you have questions, please, check out the http://www.fi.muni.cz/~tomp/xpp for updates or write to the author Tomas Pitner, tomp@informatics.muni.cz. Any comments are welcome.

This page has been visited times since September 5, 2001.