W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > May 2008

Relationship between @xpath-version and p:system-property('p:xpath-version')

From: <Toman_Vojtech@emc.com>
Date: Thu, 15 May 2008 05:22:19 -0400
Message-ID: <6E216CCE0679B5489A61125D0EFEC7870B0D3AD3@CORPUSMX10A.corp.emc.com>
To: <public-xml-processing-model-wg@w3.org>

Hi all,

Since it is possible to specify the XPath version when declaring a step,
I wonder if that has any influence on the p:xpath-version system
property. Suppose I declare two steps:

...
<p:declare-step type="x:foo" xpath-version="1.0">
  <p:input port="source"/>
  <p:output port="result"/>
  <p:option name="xpath"/>
</p:declare-step>

<p:declare-step type="x:bar" xpath-version="2.0">
  <p:input port="source"/>
  <p:output port="result"/>
  <p:option name="xpath"/>
</p:declare-step>
...

and use them as follows:

...
<x:foo>
  <p:with-option name="xpath"
select="p:system-property('p:xpath-version')"/>
</x:foo>
<x:bar>
  <p:with-option name="xpath"
select="p:system-property('p:xpath-version')"/>
</x:bar>
...

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.

Just thinking: Wouldn't it make sense to have an XPath extension
function p:xpath-version-supported(version), similarly to
p:psvi-supported()? Some of the processors will support only XPath 1.0,
some 2.0, but not necessarily 1.0, etc., so perhaps it could be useful
to have access to this information in the pipeline.

Regards,
Vojtech
Received on Thursday, 15 May 2008 09:23:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 15 May 2008 09:23:14 GMT