This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Test fn-unparsed-text-023 has an environment that explicitly sets the static base URI to "undefined"; it then uses a relative URI in the call to unparsed-text(), and expects an error code of XPST0001. A number of other tests in the unparsed-text() family are similar. Several problems. (a) the documentation/schema says that the magic value is "##undefined" rather than "#UNDEFINED". I have changed the schema to match the instances. (b) there's nothing that requires a processor to be able to set the static base URI to "undefined". In Saxon, for example, the base URI defaults to the current working directory. The test therefore has a dependency which needs to be documented. (c) even if the static base URI is undefined, I'm not sure a static error is appropriate. The spec of XPST0001 says "If analysis of an expression relies on some component of the static context that has not been assigned a value, a static error is raised [err:XPST0001].". But the analysis of this expression doesn't depend on knowing the static base URI; it is only the execution that relies on it (static base URI is used only if the supplied URI is relative, which is not known until execution time). (The debate on static base URI versus dynamic Base URI is relevant here).
Hi Tim, I am assigning this bug entry to you.
> (b) there's nothing that requires a processor to be able to set the static > base URI to "undefined". In Saxon, for example, the base URI defaults to the > current working directory. The test therefore has a dependency which needs to > be documented. How would you like this to be documented? i.e. do you want a <dependency> element e.g. <dependency type="feature" value="canHaveUndefinedBaseURI" />
This test was written following the examples for fn:doc. See for example: <test-case name="K2-SeqDocFunc-4"> <description> Invoke fn:doc with a relative, Unix-like URI. Since it's relative, and the base-uri may be undefined, XPST0001 is allowed. </description> <created by="Frans Englich" on="2007-11-26"/> <test>doc("/example.com/example.org/does/not/exist/doesNotExist/works-mod.xml")</test> <result> <any-of> <error code="FODC0002"/> <error code="XPST0001"/> </any-of> </result> </test-case> While I see your point, I'm not inclined to change the expected result unless all tests expecting XPST0001 are reviewed. And if it were to be changed, to what code would you suggest?
Any further comments or would you be happy to close?
I think we can closed this bug now.