XPT, a XML general-purpose preprocessing tool

Bram Latupeirissa

Version xpt.xml 1.32 2012/08/15

2012-08-28


Table of Contents

1. Introduction
2. Functionality
3. XPT command-line options
4. Startup and environment
4.1. environment
4.2. start-up file
5. Built-in commands
5.1. XML bindings
5.2. Variable substitution
5.3. Python bindings
5.4. XPT library
6. XPT development
6.1. Sources and build-system
6.2. Documentation
1. Ideas and things todo
2. Pointers
3. Manpages
TEST test doc_source.... — TEST test doc_source....
extract embedded man-pages from source code — extract embedded man-pages from source code
write out XPT debug message — write out XPT debug message
write out XPT warning message — write out XPT warning message
issue an XPT error — issue an XPT error
Write out list of xpt variables — Write out list of xpt variables
register a Python function to XPT — register a Python function to XPT
xpt table class — xpt table class
load a Python module — load a Python module
insert Python code — insert Python code
start external command — start external command
issue a warning — issue a warning
issue a error — issue a error
a XML preprocessor — a XML preprocessor

1. Introduction

Somewhere in 2010 I had a project where DocBook XML documents needed to be enriched with data coming from various, non-XML sources. The idea was to have scripting insert DocBook elements into a DocBook template. There were two options, first write a program to convert non-XML data into DocBook XML elements and second write a more generic program to insert DocBook XML elements into the original source. XPT (xml-xpt) does this. It replaces xpt processing instructions in an XML input file.

This way a library can be setup with (user-) predefined functions.

This document is also available in Acrobat pdf format at http://xml-xpt.sourceforge.net/docu/xpt.pdf.