XProc Examples

1. XProc Examples

A few examples using xprocxq a pure XQuery implementation of the XProc standard, which is closely integrated with eXist.

To run any of these examples, some files have to be stored into the database. This can be done through the "Examples Setup" page on the admin web application.

Examples
hello.xproc [debug] "Hello world" in XProc
xslt-identity.xproc [debug] Pass an XML fragment through an XSLT identity transformation.
twitter.xproc [debug] Retrieve a feed from twitter in Atom format and display it.
p:directory-list-native.xproc [debug] p:directory step example working on eXist collections.
p:directory-list-local.xproc [debug] p:directory step example on file system directories (NOTE - requires existdb File module to be enabled).
xslt transformation [debug] Apply xslt transformation to input supplied as a url paramater.
pxquery step example [debug] Use p:xquery with xproc:escape.
pxquery step which can access XQuery context [debug] Use p:xquery with xproc:preserve-context.
p:http-request [debug] retrieve html page using p:http-request
p:import with p:library [debug] rudimentary example of importing a custom step using p:import and p:library

Note

Files with the .xproc extension are identified by the REST server and automatically forwarded to xprocxq for processing.

Wolfgang M. Meier
wolfgang at exist-db.org