W3C home > Mailing lists > Public > xproc-dev@w3.org > September 2009

Notes on Calumet and resolve-uri

From: Manfred Staudinger <manfred.staudinger@gmail.com>
Date: Thu, 24 Sep 2009 12:11:20 +0200
Message-ID: <a946be3a0909240311x2a7b1439ib98c1f078cc2b991@mail.gmail.com>
To: xproc-dev <xproc-dev@w3.org>
When I execute the pipeline [1] with Calumet 1.0.9 from the command
line, I get the following messages:
1.
p:base-uri(.):***file:/J:/any/***
p:base-uri(.):******
While the base uri is correct _before_ the p:for-each step, it is lost
inside. But even the step iterates over the child elements (which have
no explicit xml:base attribute), they should have inherited it (see
http://www.w3.org/TR/xmlbase/ )
2.
p:resolve-uri(*/@name):***test%20yyy***
p:resolve-uri(*/@name, file:/J:/any/):***file:/J:/any/test%20yyy***
When given an (for anyURI) invalid name p:resolve-uri % encodes it,
but has also no base uri to use. A 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:x="http://www.emc.com/documentum/xml/xproc"
	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="x:message">
		<p:option name="message" required="true"/>
		<p:option name="stderr" select="'true'"/>
		<p:option name="stdout" select="'false'"/>
		<p:input port="source" sequence="true"/>
		<p:output port="result" sequence="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>
<x:message><p:with-option name="message"
select="concat('p:base-uri(.):***', p:base-uri(.),
'***')"/></x:message>
	<p:for-each name="level-1">
		<p:iteration-source select="/c:directory/c:directory"/>
		<p:output port="result"/>
<x:message><p:with-option name="message"
select="concat('p:base-uri(.):***', p:base-uri(.),
'***')"/></x:message>
<x:message><p:with-option name="message"
select="concat('p:resolve-uri(*/@name):***', p:resolve-uri(*/@name),
'***')"/></x:message>
<x:message><p:with-option name="message"
select="concat('p:resolve-uri(*/@name, file:/J:/any/):***',
p:resolve-uri(*/@name, 'file:/J:/any/'), '***')"/></x:message>
		<p:identity/>
	</p:for-each>
</p:declare-step>
Received on Thursday, 24 September 2009 10:25:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 24 September 2009 10:25:50 GMT