- SNT/NSI (fr)
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), macOS 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.
The default namespace is
xppq, but it can be changed by setting the
Parameters/Namespace entry in the configuration file (the
.xcfg suffixed file), or with the
-n|--namespace argument for the command-line version of XPPq (launch
xppq --help for more details).
See also the configuration related 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.
XPPq is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with
XPPq. If not, see <http://www.gnu.org/licenses/>.
Other rights can be granted, but only by an explicitly written permission from the author of
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/).