xppq is a tool from the Epeios project which transforms an XML file to another XML file, following directives inserted directly in the source XML file. This directives allow to handle macros, to affect value to variables and to test their values, to include files… In a glance, xppq aims to be to XML what
cpp is to C/C++.
To achieve this, following directives are available:
<xpp:expand href=“file”/>which allows the inclusion of a file,
<xpp:define name=“name”>…</xpp:define>, which, in combination with
<xpp:expand select=“name”/>allows the definition and expansion of a macro,
<xpp:set name=“name” value=“value”/>, which, in combination with
<xpp:ifeq select=“name” value=“value”>…</xpp:ifeq>allows the conditional inclusion of an XML tree.
More about this directives and the others can be found in the directives dedicated page.
The preprocessor is also embedded in all the Epeios software which handle XML files. So the xpp directives can also be used for those files.
The default XML namespace:
xppq works with GNU/Linux (and probably other POSIX compliant operating systems), OS X and Windows, on IA-32, AMD64 and ARM (AArch32 and AArch64, like those on Raspberry Pi, Banana Pi, ODROID… devices) architectures.
xppq handles 8-bits encoded files, and also UTF-8 encoded files, with or without BOM. All included files (using the
expand directive) have to use the same encoding as the file which includes them.
See the compilation dedicated page to see how to obtain the binaries.
Two files called
xppq.xlcl have to be in the same directory as the one containing the binary.
The preprocessor, and also an XML parser, are available as addon for Node.js (
npm install xppq).
See the configuration dedicated page.
xppq is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Other rights can be granted, but only by an explicitly written permission from the author of xppq.
The recognized directives are:
bloc. More details can be found on this page, on which you can also find an example of use.
xppq is developed by Claude SIMON (http://q37.info/contact/).