====================== How to use dbxincluder ====================== Installation ============ dbxincluder depends on setuptools for automatic installation, docopt for option processing and lxml for XML processing. Simply run .. code-block:: bash ./setup.py to install dbxincluder. A virtual python3 environment ("pyvenv") is recommended. Usage ===== .. code-block:: bash > dbxincluder --help dbxincluder: XInclude and DocBook transclusion processor Usage: dbxincluder [options] [--] dbxincluder -h | --help dbxincluder --version Options: -o Output file [default: -] -c XML catalog to use [default: /etc/xml/catalog] -h --help Show this screen. --version Show the version. dbxincluder either reads from standard input (stdin) or a file and outputs to stdout or the given output file. Error messages get printed to stderr. The following invocations do the same: .. code-block:: bash python3 -m dbxincluder input.xml dbxincluder input.xml dbxincluder - < input.xml dbxincluder -o - - < input.xml Normally you want to write the output to a file. Use redirection or the ``-o`` parameter for that: .. code-block:: bash python3 -m dbxincluder input.xml > output.xml dbxincluder input.xml > output.xml dbxincluder - < input.xml > output.xml dbxincluder -o output.xml - < input.xml dbxincluder -o output.xml input.xml Example ======= XInclude only ------------- source.xml: .. code-block:: xml ent part.xml: .. code-block:: xml ent Result: .. code-block:: xml > dbxincluder source.xml ent ent DocBook Transclusion -------------------- Example taken from http://docbook.org/docs/transclusion/#tutorial source.xml: .. code-block:: xml Definitive Printer Guide Buying printer Grab money, go to shop, ... Quick installation guide Carefully follow all procedures below. Maintenance Be friendly to your printer when you speak to it. If the green led is blinking, please add missing paper using the following procedure. procedure.001.xml: .. code-block:: xml Inserting paper into printer This procedure is for printer owners. If you don't have a printer, consider buying one. Make sure that you have paper. Insert paper into printer. If you don't have paper, consult Result: .. code-block:: xml > dbxincluder source.xml Definitive Printer Guide Buying printer Grab money, go to shop, ... Quick installation guide Carefully follow all procedures below. Inserting paper into printer This procedure is for printer owners. If you don't have a printer, consider buying one. Make sure that you have paper. Insert paper into printer. If you don't have paper, consult Maintenance Be friendly to your printer when you speak to it. If the green led is blinking, please add missing paper using the following procedure. Inserting paper into printer This procedure is for printer owners. If you don't have a printer, consider buying one. Make sure that you have paper. Insert paper into printer. If you don't have paper, consult