- From: <Toman_Vojtech@emc.com>
- Date: Fri, 23 May 2008 03:33:29 -0400
- To: <public-xml-processing-model-wg@w3.org>
> -----Original Message----- > From: public-xml-processing-model-wg-request@w3.org > [mailto:public-xml-processing-model-wg-request@w3.org] On > Behalf Of Norman Walsh > Sent: Thursday, May 22, 2008 7:50 PM > To: public-xml-processing-model-wg@w3.org > Subject: Re: Relationship between @xpath-version and > p:system-property('p:xpath-version') > > / Toman_Vojtech@emc.com was heard to say: > | what are the values of the 'xpath' option that will be passed to the > | steps? Is p:xpath-version sensitive to @xpath-version in the step > | declaration, or does it contain the default XPath version > supported by > | the XProc processor? I would prefer the latter, otherwise things may > | become too complex/unclear. > > It contains the version that the processor is using for this entire > pipeline. I expect that an implementation will always return either > 1.0 or 2.0, depending on what they support. But if they can support > both, I think they should make that decision on a per-run basis, not a > per-step basis. OK, so if I have a pipeline like this: <p:pipeline xpath-version="1.0" xmlns:x="http://www.test.com"> <p:declare-step type="x:test" xpath-version="2.0"> <p:choose> <p:when test="p:system-property('p:xpath-version') = '1.0'"> <p:identity> <p:input port="source"> <p:inline> <p>XPath 1.0</p> </p:inline> </p:input> <p:identity> </p:when> <p:otherwise> <p:identity> <p:input port="source"> <p:inline> <p>XPath 2.0</p> </p:inline> </p:input> <p:identity> </p:otherwise> </p:choose> </p:declare-step> <x:test/> </p:pipeline> What will be the result? If p:xpath-version is set on 'per run' basis, will it always produce <p>XPath 1.0</p>? Or, if the processor is XPath 2.0 based, may I get <p>XPath 2.0</p>? Regards, Vojtech
Received on Friday, 23 May 2008 07:34:46 UTC