This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Most likely the FunctX contains static typing errors and therefore needs alternative queries for static typing queries. This is currently being looked into, but feel free to add further comments on this topic here.
I feel strongly that we should not exclude real-life test cases such as the functx tests from our suite simply because they do not meet a self-imposed rule on static typing. The fact is, many implementations of XQuery do dynamic typing, and it's useful to implementors and users to know that these implementations are interoperable. We should mark the tests in the catalog as not passing static typing, but otherwise leave them unchanged. As for the namespace not being example.com, it seems a frivolous objection. Who benefits from the work needed to make the change?
We added a new static-name attribute on element query some time ago, it looks like this: <query name="Constr-comppi-compname-8" static-name="Constr-comppi-compname-8-static-cbcl" date="2005-05-20"/> So, when adapting to static typing, a new query is added instead of that the original query suffer. So with this approach I think it's not destructive to extend the coverage to include static typing implementations. Appears to already be used in a 160 cases. Regarding, example.com: well, this case happened to be easy to fix: commit 74d67939ad38af1c81c2ad441bfd03dfe74ac32e Author: Frans Englich <fenglich@fastmail.fm> Date: Fri May 16 10:40:11 2008 +0200 Use example.com instead. diff --git a/generateFiles.xsl b/generateFiles.xsl index 5868893..cdd0be6 100644 --- a/generateFiles.xsl +++ b/generateFiles.xsl @@ -41,7 +41,7 @@ (: Date: <xsl:sequence select="current-date()"/> :) (:**************************************************************:) -declare namespace functx = "http://www.functx.com";</xsl:value-of> +declare namespace functx = "http://www.example.com/";</xsl:value-of>^M <xsl:apply-templates select="local:allDependenciesFor($from)//dat:nsDecl"/> <!-- We add a dot, so we eliminate duplicates. -->
For most of the changes I'm seeking to make static-typing specific tests using static=name="...", but for functx-functx-substring-before-match-* I'd like to change the return type for the normal version, unless anyone objects. So currently we have: declare function functx:substring-before-match ( $arg as xs:string? , $regex as xs:string ) as xs:string { tokenize($arg,$regex)[1] } ; The current function will return an empty sequence if $arg is empty, so really should be defined as xs:string?
Similarly for functx-functx-max-line-length-* the function: declare function functx:max-line-length ( $arg as xs:string? ) as xs:integer { max( for $line in functx:lines($arg) return string-length($line)) } ; May return at empty-sequence if $arg is an empty sequence, so I think should have return type xs:integer? in the normal version rather than a static-typing specific version.
Yeah, I'll fix those.
Requests in comment #3 and #4 should be fixed in CVS.
I'm closing this report, the demand comes from Nick & co, who will provide the patch for this if they see the need.