Automation pipeline
Posted: 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?
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?