The content-model of c:result is overloaded already in the XProc specification itself: see the p:exec step. For text output with wrap-result-lines=true, it produces the following result:
<c:result>
<c:line>line1</c:line>
<c:line>line2</c:line>
…
</c:result>
But I don't think the content model of c:result is defined anywhere in the spec (and I am not sure it is a good idea to do that. IMHO, it is just a wrapper with no special meaning). Section 7 (Standard Step Library) says that: "…several steps use this element for result information:
<c:result>
string
</c:result>
"
but I read this more as a hint of what to expect from a typical standard XProc step.
I remember raising this long time ago but I think the conclusion of the WG was that this not really an issue.
--
For EXProc, my opinion is that we can just fix the problem of distinguishing between a successful/unsuccessful c:result easily by saying that if you use fail-on-error=false, you get an c:error document, and not a c:result document. Or something like that.
Vojtech
From: public-xml-processing-model-wg-request@w3.org [mailto:public-xml-processing-model-wg-request@w3.org] On Behalf Of Innovimax SARL
Sent: Tuesday, April 20, 2010 1:05 PM
To: XProc WG
Subject: Extensibility of c:result
Dear,
I think this is the right place for that discussion
We use for the moment c:result in many places in the spec, but the way it is used is not extensible
The content is most of the time a single string as a direct child
I know we moved on from attribute because it was hard to get the infomation from it, but could we better go for an extra wrapper ?
<c:result>
<uri>http://....</uri>
</c:result>
I'm saying this because I already see some problem of using c:result for example when there is an error or not (in exproc pxf:copy) : we should be able to make the difference between those two
Of course, we could expect that if we will need extension then we will add an extra attribute to c:result, like @version=2 telling that you will need special care about the content, but it will make existing pipeline non conformant
The second point, is that a conformant implementation might need to output extra information using it's own namespace and that would not be possible (unless using attribute which is pretty limited)
Mohamed
--
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €