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

Re: xslt step with stylesheet having <xsl:output method="text" />

From: Florent Georges <fgeorges@fgeorges.org>
Date: Fri, 19 Feb 2010 15:42:07 +0100
Message-ID: <ebaca5bf1002190642j5906407eh4c8906409db1b375@mail.gmail.com>
To: Bruce Chapman <bruce.chapman@nec.co.nz>
Cc: public-xml-processing-model-comments@w3.org, xproc-dev@w3.org
On 19 February 2010 04:07, Bruce Chapman wrote:

> And yes I solved my problem by changing the stylesheet to have
> XML output method, and wrapped the text in a <c:data> document
> element. But that now means I have two versions of the
> stylesheet, one for use in Xproc, and a separate one for use in
> our proprietary pipeline tool which uses text pipes.

  You can always use a one-line stylesheet (ok, a "few-lines"
stylesheet) that imports your original stylesheet and wraps its
output in, say, a data element:

    <p:input port="stylesheet">
       <p:inline>
          <xsl:stylesheet version="2.0">
             <xsl:import href="your original import uri"/>
             <xsl:template match="/">
                <data>
                   <xsl:apply-imports/>
                </data>
             </xsl:template>
          </xsl:stylesheet>
       </p:inline>
    </p:input>

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/
Received on Friday, 19 February 2010 14:43:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 19 February 2010 14:43:03 GMT