This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21157 - [XPROCTS] Test resolve-uri #001
Summary: [XPROCTS] Test resolve-uri #001
Status: NEW
Alias: None
Product: XML Processing Model
Classification: Unclassified
Component: Pipeline language (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Norman Walsh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-28 16:50 UTC by Tim Mills
Modified: 2013-02-28 16:50 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2013-02-28 16:50:30 UTC
This test depends on the base URI of the test environment, despite it going to some lengths to avoid this.

The use of p:resolve-uri('test') in

      <p:string-replace match="para[@class]/text()">
	<p:with-option name="replace"
		       select="concat('&quot;',p:resolve-uri('test'),'&quot;')"/>
      </p:string-replace>

is a compile-time constant based on the base URI of the test file.  Even if the test were written as:

      <p:string-replace match="para[@class]/text()">
	<p:with-option name="replace"
		       select="'p:resolve-uri(''test'')')"/>
      </p:string-replace>

then p:string-replace would evaluate 'replace' as the XPath expression

p:resolve-uri('test')

with a static base URI as "the base URI of the element on which the expression occurs" i.e. that of p:with-option.

Either way, the resolved URI has no relationship to the base URI of the document on the source port.