Editing XProc Scripts
XProc is an XML pipeline language that can be used to script
transformations. An XProc script is edited as an XML document that is validated against a
RELAX NG schema, or if the script has an associated validation scenario, then the XProc engine
selected in the scenario is used as the validating engine (if the XProc engine supports
validation). The default engine for XProc scenarios is a version of the Calabash
engine that comes bundled with Oxygen XML version . The
default engine supports content completion and validation of XProc 1.0, 3.0, and 3.1
files.
Note:
If a custom engine is used, the validation support for
XProc version 3.x depends on whether it is available for the particular custom
engine.
Notice:
Oxygen XML supports running XSLT
stylesheets that contain AI functions. For information about the supported AI functions, see
Oxygen AI Positron Assistant: Function Calls.
XProc Content Completion
Oxygen XML helps you edit a XProc scripts through the Content Completion Assistant, offering proposals that are valid at the cursor position. It can be manually activated with the shortcut.
The content completion inside the <input/inline>
element from the
XProc namespace http://www.w3.org/ns/xproc offers elements from the following schemas
depending both on the @port
attribute and the parent of the
<input>
element. When invoking the content completion inside the
<inline>
XProc element, the list of content completion proposals is
populated as follows:
- If the value of the
@port
attribute isstylesheet
and the<xslt>
element is the parent of the<input>
elements, the Content Completion Assistant offers XSLT elements. - If the value of the
@port
attribute isschema
and the<validate-with-relax-ng>
element is the parent of the<input>
element, the Content Completion Assistant offers RELAX NG schema elements. - If the value of the
@port
attribute isschema
and the<validate-with-xml-schema>
element is the parent of the<input>
element, the Content Completion Assistant offers XML Schema schema elements. - If the value of the
@port
attribute isschema
and the<validate-with-schematron>
element is the parent of the<input>
element , the Content Completion Assistant offers either ISO Schematron elements or Schematron 1.5 schema elements. - If the above cases do not apply, then the Content Completion Assistant offers elements from all the schemas from the above cases.
Tip:
XPath 3.0 functions are also available in the Content Completion
Assistant for XProc 3.0 documents.


XProc Syntax Highlighting
The XProc editor assists you in writing XPath expressions by offering dedicated coloring schemes for syntax highlighting.
To customize the colors or styles used for the syntax highlighting colors for XProc, follow
these steps:
Enabling Extensions in Calabash
To configure an extension:
- Edit the following file: OXYGEN_INSTALL_DIR/lib/xproc/calabash/engine.xml.
- Add the extension and its value as a
system-property
, as in the following example:<system-property name="com.xmlcalabash.allow-text-results" value="true"/>