Re: 'missed' step?

Dave Pawson <dave.pawson@gmail.com> writes:
> I'm using calabash, unzip a file then I want to pretty print it, using
> xslt to indent it.
>
> <p:pipeline xmlns:p="http://www.w3.org/ns/xproc"
> 	     xmlns:c="http://www.w3.org/ns/xproc-step"
> 	     xmlns:cx="http://xmlcalabash.com/ns/extensions"
> 	     xmlns:pxp="http://exproc.org/proposed/steps"
> 	     exclude-inline-prefixes="pxp"
>                 version="1.0">

<p:serialization port="result" indent="true"/>

> <p:declare-step type="cx:unzip" name="uz">
>   <p:output port="result"/>
>   <p:option name="href" required="true"/>                       <!-- anyURI -->
>   <p:option name="file"/>                                       <!-- string -->
>   <p:option name="content-type"/>                               <!-- string -->
> </p:declare-step>
>
> <cx:unzip  href='11620.epub' name='unravel' />
>
> <p:xslt name='clean' version="1.0">
>   <p:input port="stylesheet" >
>     <p:document href="clean.xsl"/>
>   </p:input>
>   <p:input port="parameters">
>             <p:empty/>
>         </p:input>
> </p:xslt>
>  </p:pipeline>
>
> The output of the pipeline is not indented, despite the stylesheet working
> on that file.
>
> Puzzled. Any suggestion please.

The output of an XSLT step in a pipeline is not a serialized sequence of
octets, it's an XML data model. The serialization options have no effect.

If you want the serialized output to be indented (or in a weird encoding
or anything else), you have to tell XProc or the XProc step that you want
it serialized that way.


                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Growth for the sake of growth is the
http://nwalsh.com/            | ideology of the cancer cell.--Edward
                              | Abbey

Received on Monday, 19 April 2010 11:19:59 UTC