Automation pipeline

<oXygen/> general issues.
Posts: 4
Joined: Sun Mar 10, 2013 4:18 am

Automation pipeline

Post by tgochenour » Thu May 22, 2014 1:53 am

I have a process I use to generate RelaxNG schema definition of a form specification grammar that evolves over time. The steps in this process are:

1) I run scrubspec.xsl which iterates through collection of all "/xml/*.spec.xml" files in two separate projects and copies each to a 'scrubspec' directory while replacing all custom field elements like <empl_id/> to <anycolumn/> which is a field destined to be a RelaxNG element with <anyName/>.
2) I run oXygen's built in schema generator across files in "/scrubspec/*.xml" and generate the schema scrubspec_out.rng.
3) I run annotatespec.xsl which inserts <a:documentation/> nodes where needed for nodes that have documentation. Output now is in annotatespec_out.rng.
4) I run documentspec.xsl against annotatespec_out.rng to generate spec.html yielding a formatted HTML document of the RelaxNG schema.

I then identify the new elements/attributes that are not annotated and add templates to annotatespec.xsl to provide documentation. Then I re-run the process.

I'd like to automate this process. I just started researching XProc as a possible solution. It doesn't appear that the Jing-Trang engine used to generate the RelaxNG schema from the sample XML files is integrated in XProc. Is there a way to automate this process within oXygen using XProc or must I break out to Java?

Posts: 6649
Joined: Fri Jul 09, 2004 5:18 pm

Re: Automation pipeline

Post by Radu » Thu May 22, 2014 9:27 am


XProc has a step which can invoke an external process called exec:

The Jing-Trang open source libraries can be started from the command line with various parameters so you could try to construct and exec such a command line.

Or you could try to have an ANT build script which runs several consecutive tasks.

Radu Coravu
<oXygen/> XML Editor

Post Reply