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

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

From: Bruce Chapman <bruce.chapman@nec.co.nz>
Date: Fri, 19 Feb 2010 16:07:46 +1300
To: public-xml-processing-model-comments@w3.org
Cc: xproc-dev@w3.org
Message-id: <F3809A2A6DA242CB95F2BDCDBD11C124@necwlgxpwapp210>
Hello,

 

The spec is unclear as to what should happen when a <p:xslt> step has a
stylesheet requesting text output method. (<xsl:output method="text" />)

 

While you would not normally want to do this, I was wishing to use an
existing stylesheet with text output method and follow it with a <p:store>
and I had hoped it would just do the right thing.

 

Calabash didn't like that - and probably rightly so according to the spec. 

 

There is no mention of this case in 7.1.31 p:xslt
<http://www.w3.org/TR/xproc/#c.xslt>  or in 2.2.2 Non-XML Documents
<http://www.w3.org/TR/xproc/#binary>  and I would expect that it should.

 

There are a couple of ways of addressing this issue IMHO.

 

1.	7.1.31 p:xslt specification could say that implementations must wrap
any method=text output document(s) in <c:data> (preferred)
2.	7.1.31 p:xslt specification could specify that stylesheets with an
output method of text are not permitted. (present situation made explicit)
3.	some convoluted gymnastics in the spec (section 2.2.2?) to permit
non xml output from p:xslt provided it only feeds into  p:store step(s)  (-
a harder way of achieving the same as option 1  :-)  )

 

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.
- hopefully I can decommission the latter before the duplication bites me
where it hurts.

 

Bruce

 
Received on Friday, 19 February 2010 11:36:06 GMT

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