- From: Matthieu Ricaud-Dussarget <matthieu.ricaud@igs-cp.fr>
- Date: Wed, 12 Oct 2011 18:49:19 +0200
- To: xproc-dev@w3.org
Thanks for the information about p:xpath-context, which I naturally didn't know. For the moment I still let p:identity, but I keep this in mind ! Thanks for your help. Regards, Matthieu. Le 12/10/2011 17:31, Norman Walsh a écrit : > Matthieu Ricaud-Dussarget<matthieu.ricaud@igs-cp.fr> writes: >> Once again, thanks a lot for your help. >> >>> <p:xslt ... name="xslt"/> >>> <p:store .../> >>> ... >>> <p:error ...> >>> <p:input port="source"> >>> <p:pipe step="xslt" port="result"/> >>> </p:input> >>> </p:error> >> I thought the input port of<p:error> shall contains the error message >> itself (within<p:inline> for example). I guess I have to get >> information on how to deal with error code and message to display. >> Anyway the problem is just above : >> <p:when >> test="count(distinct-values(/igs:aggregate/doc/pages/page/@viewportX))!=1"> >> <p:error ...> >> </p:when> >> My guess is that the xproc processor is not able to perform the xpath >> test above because it can't define a context node at this point of the >> pipeline... because just above is a<p:store> which doesn't through any >> output! > I've lost track of the whole pipeline, but you can provide the context > for a p:when with p:xpath-context: > > <p:when test="..."> > <p:xpath-context> > <p:pipe .../> > ... > >>> But since this is a common case, it is worthwhile to declare a helper step to do that. >> 100% agree ! >>> I wrote the following, which combines a p:store with such input >>> rerouting, together with a p:choose so the p:store is only done if a >>> debug parameter was passed through.. >> I actually don't know how to use such a self define step. >> My xpl file starts with<p:declared-step> element : It seems I can't add >> a<p:declared-step> within my root element<p:declared-step>. >> I thought I should put it in another xpl document and then import it >> from my current xpl with<p:import> but... It's seems<p:import> is not >> allowed as child of<p:declared-step>. > You can put a declare-step inside a declare-step. If you're having trouble, > it'll be easier to figure out if you post the pipeline that's causing problems. > > Be seeing you, > norm > -- Matthieu Ricaud IGS-CP Service Livre numérique
Received on Wednesday, 12 October 2011 16:49:52 UTC