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

There is dynamic error err:XD0001: "It is a dynamic error if a non-XML
resource is produced on a step output or arrives on a step input." This
really captures the essence of XProc, where only XML is allowed to flow
between the steps in the pipeline.

 

You are asking for a specific feature for the p:xslt step, but I am
afraid the same new rules for wrapping the non-XML results would have to
apply to any steps (standard or extension) that may produce non-XML
output. And that would be quite a substantial change to the spec at this
stage of the game, I think.

 

Regards,

Vojtech

 

--

Vojtech Toman

Principal Software Engineer

EMC Corporation

toman_vojtech@emc.com

http://developer.emc.com/xmltech

 

 

 

From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On
Behalf Of Bruce Chapman
Sent: Friday, February 19, 2010 4:08 AM
To: public-xml-processing-model-comments@w3.org
Cc: xproc-dev@w3.org
Subject: xslt step with stylesheet having <xsl:output method="text" />

 

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  J  )

 

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 12:31:45 UTC