W3C home > Mailing lists > Public > xproc-dev@w3.org > February 2009

Re: Calabash, pass in the stylesheet path on command line?

From: Norman Walsh <ndw@nwalsh.com>
Date: Wed, 04 Feb 2009 14:48:35 -0500
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <m2ljsmyodo.fsf@nwalsh.com>
Steve Whitlatch <steve@swhitlat.phxcoxmail.com> writes:
> How might I pass to Calabash a stylesheet path value to be used in a 
> <p:xslt> step? 

Off the top of my head:

> Given:
> <p:declare-step name="main" xmlns:p="http://www.w3.org/ns/xproc">
>   <p:input port="source"/>
>   <p:output port="result"/>
>   <p:input port="parameters" kind="parameter"/>
    <p:option name="stylesheet" required="yes"/>

    <p:load name="userstyle">
      <p:option name="href" select="$stylesheet"/>

>   <p:xslt>
     <p:input port="source">
       <p:step name="main" port="source"/>
>    <p:input port="stylesheet">
       <p:step name="userstyle" port="result"/>
>    </p:input>
>   </p:xslt>
> </p:declare-step>
> I want to make the <p:xslt> step use an XSL file located at a path value  
> passed in on the command line. 

> An example of what I would like to do, would be something like: 
> ../runcalabash.sh -i source=xmlFile.xml \
> -o result=foFile.fo \
> -XXX stylesheet=cust_layer.xsl
> simple_pipe.xpl.xml \

../runcalabash.sh -isource=xmlFile.xml \
   -oresult=foFile.fo simple_pipe.xpl.xml \

> And the the cust_layer.xsl file would be used by the <p:xslt> step. Any 
> hope for this?

Yes :-)

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com> | There is no glory so bright but the
http://nwalsh.com/            | veil of business can hide it
                              | effectually. With most men life is
                              | postponed to some trivial business and
                              | so therefore is heaven. Men think
                              | foolishly they may abuse and misspend
                              | life as they please and when they get
                              | to heaven turn over a new leaf.--Henry
                              | David Thoreau

Received on Wednesday, 4 February 2009 19:49:20 UTC

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