Variables substituted in the parameter values passed to the –p and –pu options

The following variables are substituted in the parameter values passed to the –p and –pu options.

Variable | Description | Example
%{I} | Full path of the input DOCX file. | C:\My Docs\report.docx
%{O} | Full path of the output XML file. | C:\My Docs\out\report.xml
%{i} | Absolute URL of the input DOCX file. | file:/C:/My%20Docs/report.docx
%{o} | Absolute URL of the output XML file. | file:/C:/My%20Docs/out/report.xml

Variables %{I}, %{O}, %{i} and %{o} may all contain one or more of following modifiers. First modifier must be preceded by character “~”.

Modifier | Description
n | The name of the file or URL without any extension.
x | The extension of the file or URL. Starts with “.”.
p | The full path of the parent directory of the file or URL.

Note that combinations of modifiers other than “~nx”, “~pn”, “~pnx” do not make sense and that, for example, %{~pnxI} is equivalent to %{I}.

Examples: let’s suppose that command-line argument in_docx_file (see above) is “C:\My Docs\report.docx” and that argument out_file is “C:\My Docs\out\report.xml”.

%{~nI} is replaced by “report”.

%{~xI} is replaced by “.docx”.

%{~pI} is replaced by “C:\My Docs”.

%{~nxo} is replaced by “report.xml”.

%{~pno} is replaced by “file:/C:/My%20Docs/out/report”.

Other variables substituted in the parameter values passed to the –p and –pu options:

The value of another parameter passed to w2x by the means of the –p or –pu options. Example: when “w2x -o map -p transform.topic-type concept ...” is executed, %{transform.topic-type} is substituted with "concept".

Any Java™ system property. Example: %{file.separator} is substituted with "\" on Windows and with "/" on the other platforms.

When a variable is not defined, its value is "", the empty string. Example: %{foo} is substituted with "".