<command name = NMTOKEN > Content: class | menu | macro | process </command> <process> showProgress = boolean : true debug = boolean : false Content: [ copyDocument|convertImage|copyProcessResources|transform| processFO|upload|post|print|read| mkdir|rmdir|delete|copy|zip|jar|shell|invoke|subProcess ]+ </process> <copyDocument to = Path selection = boolean : false preserveInclusions = boolean : false saveCharsAsEntityRefs = boolean : false indent = boolean : false encoding = (ISO-8859-1|ISO-8859-13|ISO-8859-15|ISO-8859-2| ISO-8859-3|ISO-8859-4|ISO-8859-5|ISO-8859-7| ISO-8859-9|KOI8-R|MacRoman|US-ASCII|UTF-16|UTF-8| Windows-1250|Windows-1251|Windows-1252|Windows-1253| Windows-1257) : UTF-8 > Content: [ extract ]* [ resources ]* </copyDocument> <extract xpath = Absolute XPath (subset) dataType = anyURI|hexBinary|base64Binary|XML toDir = Path baseName = File basename without an extension extension = File name extension > <processingInstruction target = Name data = string /> | <attribute name = QName value = string /> | any element </extract> <resources match = Regexp pattern copyTo = Path referenceAs = anyURI /> <convertImage from = Glob pattern skip = List of file name extensions to = Path format = List of file name extensions lenient = boolean : false > Content: [ parameter | parameterGroup ]* </convertImage> <parameter name = Non empty token url = boolean > Content: Parameter value </parameter> <parameterGroup name =Non empty
token /> <copyProcessResources resources = anyURI | @anyURI | Glob pattern to = Path name = NMTOKEN /> <transform stylesheet = anyURI version = Non empty token : "1.0" cacheStylesheet = boolean : false file = Path to = Path label = Non empty token documentation = anyURI possibly containing a %{parameter.name} variable > Content: [ parameter | parameterGroup ]* </transform> <processFO processor = Non empty token file = Path to = Path > Content: [ parameter ]* [ processFO ]? </processFO> <upload base = anyURI > Content: [ copyFile|copyFiles ]+ </upload> <copyFile file = Path to = anyURI /> <copyFiles files = Glob pattern toDir = anyURI /> <post url = anyURI valueCharset = Any encoding supported by Java : ISO-8859-1 readResponse = boolean : false > Content: [ field ]+ </post> <field name = Form field name (US-ASCII only) > Content: value | file </field> <value> Content: xs:string </value> <file name = Path contentType = Content type /> <print file = Path printer = Printer name /> <read file = Path encoding = Any encoding supported by Java or default /> <mkdir dir = Path quiet = boolean : false /> <rmdir dir = Path quiet = boolean : false /> <delete files = Glob pattern recurse = boolean : false quiet = boolean : false /> <copy files = Glob pattern to = Path recurse = boolean : false quiet = boolean : false /> <zip archive = Path > Content: [ add ]+ </zip> <add files = Glob pattern baseDir = Path : . store = boolean : false /> <jar archive = Path > Content: [ add ]+ [ manifestFile | manifest ]? </jar> <manifestFile> Content: Path </manifestFile> <manifest> Content: [ attribute ]+ </manifest> <attribute name = NMTOKEN (matches [0-9a-zA-Z_-]+ after substitution of variables) > Content: string </attribute> <shell command = Shell command platform = (Unix | Windows | Mac | GenericUnix) /> <invoke method =Qualified name of a Java static method
arguments = string : "" /> <subProcess name = NMTOKEN parameter = string />
Define an arbitrarily complex transformation of part or all of the document being edited.
A temporary directory is created for each execution of a process-command. This temporary directory is intended to contain all the files generated by the process.
Value type Path is a file path such as images/log.gif or C:\temp\1.tmp
. If this file path is relative, it is relative to the temporary process directory. Character '/'
can be used as a path component separator even on Windows. In fact, it is recommended to always use '/'
as a path component separator to keep XXE configuration files portable across platforms.
Value type Glob pattern is a file path, possibly with wildcards such as images/*.gif
or ..\[a-zA-Z]*
. Everything said about value type Path also applies to value type Glob pattern. It is called a glob pattern because it follows Unix conventions, not Windows conventions. Example 1: *.*
matches the_document.xml
, but does not match the_document
. Example 2: [a-z]*.html
matches report.html
, but does not match Report.html
(even on Windows where filenames are case-insensitive).
A process-command returns the result of its last executed child element which itself returns a result (if any). The following child elements may return a result: post, read, invoke, subProcess.