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 30140 - [xslt3ts] catalog-005 (validation of test stylesheets)
Summary: [xslt3ts] catalog-005 (validation of test stylesheets)
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 Test Suite (show other bugs)
Version: Proposed Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Abel Braaksma
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-10 15:02 UTC by Michael Kay
Modified: 2017-10-10 08:25 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2017-07-10 15:02:34 UTC
Test catalog-005 is designed to validate all stylesheet documents referenced by non-error test cases against the schema for XSLT 3.0 stylesheets.

Two problems:

(a) it only validates documents referenced by a "stylesheet" element in the catalog, not those referenced by a "package" element.

(b) the validation is done using the construct:

<xsl:variable name="copy">
            	  <xsl:copy-of select="$doc" validation="strict"/>
                </xsl:variable>

and the value of $copy is never referenced. That is, the validation is a side-effect of a variable binding which an optimizer can optimize to nothing. This is what Saxon has been doing. As a result, Saxon has been failing to report invalidity on the following stylesheets:

   <invalid code="err:XTTE1510"
            file="accept-A.xsl"
            message="Eleven validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-A.xsl"
            message="Eleven validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-B.xsl"
            message="Ten validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-001.xsl"
            message="Ten validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-002.xsl"
            message="Ten validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-005.xsl"
            message="Five validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-007a.xsl"
            message="Five validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-008.xsl"
            message="Two validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-009.xsl"
            message="Three validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-010.xsl"
            message="Three validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-022.xsl"
            message="Four validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="accept-040.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="accept-042.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="accept-044.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="accept-046.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="accumulator-020.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="accumulator-020.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="accumulator-068.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="expose-A.xsl"
            message="Three validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="expose-001.xsl"
            message="Four validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="expose-007.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="function-0119.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="function-1025.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="function-1026.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="function-1025.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="function-1026.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="function-1025.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="function-1026.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="output-0701.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="output-0702.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="output-0704.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="output-0707.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="output-0708.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="override-f-002.xsl"
            message="Two validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="override-f-008.xsl"
            message="Two validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="override-f-024a.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="override-f-026a.xsl"
            message="Two validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="override-f-026b.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="override-f-027a.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="override-f-031a.xsl"
            message="One validation error was reported"/>
   <invalid code="err:XTTE1510"
            file="package-017.xsl"
            message="Two validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="xml-to-json-C.xsl"
            message="Three validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="xml-to-json-D2.xsl"
            message="Three validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="xml-to-json-D2.xsl"
            message="Three validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="xml-to-json-D2.xsl"
            message="Three validation errors were reported"/>
   <invalid code="err:XTTE1510"
            file="forwards-104.xsl"
            message="One validation error was reported"/>

I have fixed the catalog-005 test so that it now reports these invalidities, but will leave the bug open until these invalidaties are all fixed.
Comment 1 Michael Kay 2017-07-10 15:57:12 UTC
The simple type "method" does not allow the values "json" or "adaptive".
Comment 2 Michael Kay 2017-07-10 21:38:39 UTC
All now working after

(a) fixing the schema-for-xslt30 as described in bug 30141

(b) making a couple of tweaks to test case catalog-005 to

(i) avoid validating stylesheets with literal result elements in the fn namespace (will fail if a schema for the fn namespace is available)

(ii) avoid validating stylesheets with //@xsl:version > 3 (will fail because everything is allowed in forwards compatibility mode)

Still need to fix bug 30149, test cases which are invalid because they use visibility="absent".
Comment 3 Michael Kay 2017-07-10 21:39:38 UTC
s/30149/30139/