W3C home > Mailing lists > Public > xproc-dev@w3.org > October 2010

Simplifying a series of simple p:xslt steps

From: Will McCutchen <mccutchen@gmail.com>
Date: Mon, 11 Oct 2010 15:42:46 -0500
Message-ID: <AANLkTi=gdzTq-OPLqVo6pObFa4+AOE2ORXJRfDxMxmFZ@mail.gmail.com>
To: xproc-dev@w3.org
I've got a simple XProc pipeline that simply applies a predetermined
series of XSLT transformations to its input document.  I'm
investigating the replacement of a Python driver script with this
XProc pipeline and Calabash.  The pipeline as I've written it
accomplishes its task, but does so in what feels to me like an
extremely verbose/redundant/repetitive way.

I'm hoping that there is an easy way to reduce some of the repetition.
 I just don't see how to do it, so far.

Here's the pipeline in question (with a number of the steps elided,
for simplicity's sake):

<?xml version="1.0"?>
<p:pipeline version="1.0" xmlns:p="http://www.w3.org/ns/xproc">
   <p:xslt name="remove-locations">
       <p:input port="stylesheet">
           <p:document href="preprocessors/remove-locations.xsl"/>

   <p:xslt name="divisions-1">
       <p:input port="stylesheet">
           <p:document href="preprocessors/divisions-1.xsl"/>

   <!-- ... plus six or seven more identical (save for name and stylesheet)
   p:xslt steps ... -->

   <p:xslt name="consolidate-descriptions">
       <p:input port="stylesheet">
           <p:document href="preprocessors/consolidate-descriptions.xsl"/>

As you can see, all of my <p:xslt> steps (if that's the right word)
follow the same pattern.  Is there anything I can do to simplify this
pipeline while staying within "plain" XProc?

I suppose, also, that XProc might simply be overkill for my use case.
If that is so, do you have any suggestions for alternatives?


Will McCutchen
Received on Monday, 11 October 2010 21:01:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:07 UTC