- From: Manfred Staudinger <manfred.staudinger@gmail.com>
- Date: Wed, 7 Oct 2009 20:49:11 +0200
- To: xproc-dev <xproc-dev@w3.org>
As I did not receive any response on this post and the problems are
still in Calabash 0.9.15, I followed the lead of Florent Georges and
submitted
http://code.google.com/p/xmlcalabash/issues/detail?id=84
http://code.google.com/p/xmlcalabash/issues/detail?id=85
for the issue manager.
Regards,
Manfred
On 24/09/2009, Manfred Staudinger <manfred.staudinger@gmail.com> wrote:
> When I execute the pipeline [1] with Calabash 0.9.14 from the command
> line, I get the following messages:
> 1.
> Message: base-uri(.):***file:/J:/any/***
> Message: p:base-uri(.):***file:/J:/any/***
> Both, the XPath 2.0 and the XProc version of base-uri give the correct
> answer, as the document passed to the step has
> xml:base="file:/J:/any/" on the document (root) element.
> 2.
> Message: resolve-uri(test):***file:/J:/bauer/planavi/dirs/test***
> Message: resolve-uri(test, base-uri(.)):***file:/J:/any/test***
> Message: p:resolve-uri(test):***file:/J:/any/test***
> The XPath 2.0 resolve-uri seems to have no base uri and uses a
> fallback, but gives the correct result when base-uri is used for a
> second parameter.
> 3.
> Message: resolve-uri(*/@name):***file:/J:/bauer/planavi/dirs/test%20yyy***
> Error : Pipeline failed: java.lang.IllegalArgumentException
> Error : Underlying exception: java.net.URISyntaxException: Illegal
> character in path at index 4: test yyy
> When confronted with an (for anyURI) invalid name "test yyy", the
> XPath 2.0 version of resolve-uri gets the name % encoded, while the
> XProc version crashes. Any solution to this problem should be seen in
> connection with the same problem for the p:make-absolute-uris step.
>
> Regards,
> Manfred
>
> [1]
> <?xml version="1.0" encoding="UTF-8"?>
> <p:declare-step name="myPipeline"
> xmlns:cx="http://xmlcalabash.com/ns/extensions"
> xmlns:c="http://www.w3.org/ns/xproc-step"
> xmlns:p="http://www.w3.org/ns/xproc">
> <p:input port='parameters' kind='parameter' primary='true'/>
> <p:output port="result" primary="true"/>
> <p:declare-step type="cx:message">
> <p:input port="source"/>
> <p:output port="result"/>
> <p:option name="message" required="true"/>
> </p:declare-step>
> <p:identity>
> <p:input port="source">
> <p:inline>
> <c:directory xml:base="file:/J:/any/">
> <c:directory name="test yyy"/>
> </c:directory>
> </p:inline>
> </p:input>
> </p:identity>
> <p:for-each name="level-1">
> <p:iteration-source select="/c:directory/c:directory"/>
> <p:output port="result"/>
> <cx:message><p:with-option name="message"
> select="concat('base-uri(.):***', base-uri(.), '***')"/></cx:message>
> <cx:message><p:with-option name="message"
> select="concat('p:base-uri(.):***', p:base-uri(.),
> '***')"/></cx:message>
> <cx:message><p:with-option name="message"
> select="concat('resolve-uri(test):***', resolve-uri('test'),
> '***')"/></cx:message>
> <cx:message><p:with-option name="message"
> select="concat('resolve-uri(test, base-uri(.)):***',
> resolve-uri('test', base-uri(.)), '***')"/></cx:message>
> <cx:message><p:with-option name="message"
> select="concat('p:resolve-uri(test):***', p:resolve-uri('test'),
> '***')"/></cx:message>
> <cx:message><p:with-option name="message"
> select="concat('resolve-uri(*/@name):***', resolve-uri(*/@name),
> '***')"/></cx:message>
> <cx:message><p:with-option name="message"
> select="concat('p:resolve-uri(*/@name):***', p:resolve-uri(*/@name),
> '***')"/></cx:message>
> <p:identity/>
> </p:for-each>
> </p:declare-step>
>
Received on Wednesday, 7 October 2009 18:49:45 UTC