A plugin for metafacture that extends it’s XML features.
The XDM (XQuery and XPath Data Model) module enables the transformation of XML documents through XSLT.
The current backend is provided by Saxon (Home Edition).
sh gradlew clean test fatJar
Produces:
metafacture-xdm-VERSION-plugin.jarinbuild/libs
Place the JAR inside the plugins directory of your metafacture-core distribution.
| Command | In | Out |
|---|---|---|
| encode-transformation | XmlReceiver | String |
| sax-to-xdm | XmlReceiver | XdmReceiver |
| transform | XdmReceiver | XdmReceiver |
| xdm-to-sax | XdmReceiver | XmlReceiver |
| xdm-to-xml | XdmReceiver | String |
Serializes the transformation of a XDM Node.
encode-transformation(stylesheet)
stylesheet: A XSL file.
Flux:
... | encode-transformation("stylesheet.xsl") | print;
Builds a XDM Node from XML events.
sax-to-xdm
Flux:
> | decode-xml | sax-to-xdm | ...
Transforms a XDM Node into a new XDM Node.
transform(stylesheet)
stylesheet: A XSL file.
Flux:
... | tranform("transformation.xsl") | encode-transformation("csv.xsl") | print;
Serializes a XDM Node into it’s XML representation.
xdm-to-xml
Flux:
... | xdm-to-xml | print;
Decomposes a XDM Node into XML events.
xdm-to-sax
Flux:
> | decode-xml | sax-to-xdm | xdm-to-sax | ...