Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about test-case fn-transform-20 #42

Open
adamretter opened this issue Jul 12, 2022 · 1 comment
Open

Question about test-case fn-transform-20 #42

adamretter opened this issue Jul 12, 2022 · 1 comment

Comments

@adamretter
Copy link
Contributor

adamretter commented Jul 12, 2022

I am looking at the fn-transform-20 test case here: https://github.com/w3c/qt3tests/blob/master/fn/transform.xml#L840

I am a little bit confused by its source definition:

<environment>
    <source role="$staticbaseuri" file="transform/staticbaseuri.xsl"  uri="http://www.w3.org/fots/fn/transform/staticbaseuri.xsl"/>
</environment>

I don't understand why it has both role and uri attributes. It would seem to me that the fn-transform-20 test itself only needs the uri attribute to make the document available to the stylesheet-location. Is this a small mistake?

Likewise, as I read in the catalog-schema.xsd, it states in English (but does not enforce in its grammar):

The role and uri attributes indicate how the source document is made available to queries (as the context item, as the value of an external variable, or as a URI that can be supplied to the doc() function.)

Perhaps it is my reading, but I interpret that to mean that there should be a role OR uri attribute, but not both.


A second issue with fn-transform-20 is that it appears to make a possible assertion that can never be fulfilled. I see:

<any-of>
    <assert>$result/x = 'http://www.example.com'</assert>
    <assert>$result/x = 'http://www.w3.org/fots/fn/transform/staticbaseuri.xsl'</assert>
</any-of>

However my reading of the test and the staticbaseuri.xsl is that it can only ever match:

<assert>$result/x = 'http://www.example.com'</assert>

Comments please

@michaelhkay
Copy link
Contributor

I agree that the role attribute is redundant.

As regards the alternative results, it's worth reading https://www.w3.org/Bugs/Public/show_bug.cgi?id=29939 which caused Tim Mills to change the test in Oct 2016 (I haven't actually looked at what the test said before). In particular, it added text to the description of the stylesheet-base-uri parameter "If the supplied stylesheet already has a base URI (which will generally be the case if the stylesheet is supplied using stylesheet-node or stylesheet-location) it is implementation-defined whether this parameter has any effect.". I think this justifies having the two alternative results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants