Xproc as an alternative to Apache ant

2009-05-24T06:23:49Z
Dave Pawson.  link
Home

Xproc as an alternative to Apache ant

I've done a tutorial on Docbook setup over the last week or so and used both Apache ant and a bash script as the top level tool to pull it all together. DC suggested I perhaps might have used xproc instead. I thought so too, until I put just a little more thought into it. This entry is my 'little more thought'

The architectures of the three (ant, bash and xproc) are different. Top level bash and ant allow me to select tasks, have a level of indirection for defining files etc., the variables in a bash script and the properties in an ant script. I'm not sure if xproc has this facility.

Bash, ant and xproc all allow me to select a sequence of operations.

Bash, ant and to a lesser extent xproc allow a reducing set of operations, xproc being most constrained to operate on XML instances. For example I had (I've now replaced it with some XSLT 2.0 processing) a Python program.

Bash and ant allow me to generate a bash|ant task then execute it. I don't think this is possible in xproc, i.e. to create, then execute a step? Am I right? The requirement is to use XSLT to analyse an XML file, generate an ant task then execute that task to check that all the variables (properties) used are actually defined (a weakness in ant IMHO)

Each step must be able to fail and exit the top level task (ant or bash) when an error occurs. I think xproc has this (requirement)

The basic list of tasks seems not unreasonable to ask of xproc, perhaps with extensions?

Zip and ftp seem most 'out of line' with xprocs requirements. Perhaps the basic one being an 'exec', e.g. execute an operating system call to run a program is what I need. Certainly not within the current scope of the xproc requirements.

Summary

Nearly, but no coconut? The key difference seems to be my list of properties (ant) or variables (bash) that I use to customize a build to a particular setup and document instance. This is used to define where the docbook files are, which file(s) are being processed, which stylesheets are in use etc. This 'layer' which is appropriate for bash and ant, seem not to fit with the xproc model. I could envisage an external XML file holding such a list being of use to xproc, with some sort of substitution (XML entities? No, not quite) going on. Any ideas?

Execute a program? Way out of scope for xproc 1.0 I think.

I don't think there is a match. Unless you can see a way round it? I'd be interested in your view.

Keywords: xproc

Comments (View)

Return to main index