diff --git a/build.gradle b/build.gradle index dbc700c35..b009138a3 100644 --- a/build.gradle +++ b/build.gradle @@ -763,12 +763,28 @@ task xslt_resources( } } +task xslt_xml( + dependsOn: ["xslt_merge_catalog", "saxon_config"], + description: "Create the XML version of the specification" +) { + inputs.file "${projectDir}/style/identity.xsl" + inputs.file xslt_merge_catalog.outputs.getFiles().getSingleFile() + outputs.file "${buildDir}/www/xslt-40/xslt-40.xml" + + doLast { + transform("${xslt_merge_catalog.outputs.getFiles().getSingleFile().toString()}", + "${projectDir}/style/identity.xsl", + "${xslt_xml.outputs.getFiles().getSingleFile()}") + } +} + task xslt_html( - dependsOn: ["xslt_merge_catalog", "xslt_resources", "setup_crossref_indexes", "saxon_config"], + dependsOn: ["xslt_merge_catalog", "xslt_resources", "setup_crossref_indexes", "saxon_config", "xslt_xml"], description: "Create the HTML version of the specification" ) { outputs.file("${buildDir}/www/xslt-40/Overview.html") inputs.dir("${projectDir}/specifications/xslt-40/style") + inputs.file xslt_xml.outputs.getFiles().getSingleFile() doLast { transform("${xslt_merge_catalog.outputs.getFiles().getSingleFile().toString()}", @@ -824,21 +840,6 @@ task xslt_html_diff( } } -task xslt_xml( - dependsOn: ["xslt_merge_catalog", "saxon_config"], - description: "Create the XML version of the specification" -) { - inputs.file "${projectDir}/style/identity.xsl" - inputs.file xslt_merge_catalog.outputs.getFiles().getSingleFile() - outputs.file "${buildDir}/www/xslt-40/xslt-40.xml" - - doLast { - transform("${xslt_merge_catalog.outputs.getFiles().getSingleFile().toString()}", - "${projectDir}/style/identity.xsl", - "${xslt_xml.outputs.getFiles().getSingleFile()}") - } -} - // ============================================================ task xpath_40( diff --git a/specifications/grammar-40/xpath-grammar.xml b/specifications/grammar-40/xpath-grammar.xml index 66dc4ca4b..bcee17244 100644 --- a/specifications/grammar-40/xpath-grammar.xml +++ b/specifications/grammar-40/xpath-grammar.xml @@ -2753,12 +2753,21 @@ ErrorVal ::= "$" VarName ( - + ) as + + + + $ + + as + + + diff --git a/specifications/xquery-40/src/expressions.xml b/specifications/xquery-40/src/expressions.xml index 2451a8fe1..d6f937aab 100644 --- a/specifications/xquery-40/src/expressions.xml +++ b/specifications/xquery-40/src/expressions.xml @@ -4043,6 +4043,7 @@ types (such as xs:integer) and function types + @@ -5201,6 +5202,10 @@ name.

FunctionTest, ArrayTest, MapTest, and RecordTest, with no change in meaning. + + Parameter names may be included in a function signature; they are purely + documentary. +

A FunctionType matches selected + @@ -5243,10 +5249,22 @@ name.

>subtype of the TypedFunctionType.

+ +

The keywords function and fn are synonymous.

+ +

If parameter names are included in a TypedFunctionType, + they are purely documentary and have no semantic effect. In particular, they + play no part in deciding whether a particular function item matches the + function type, and they never appear as keywords in function calls. + For example the construct + function($x as node()) as xs:string designates exactly the same type + as function(node()) as xs:string.

+

Any parameter names that are supplied must be distinct + .

-

In consequence, a TypedFunctionType - may match certain maps and arrays, as described in and +

A TypedFunctionType + may also match certain maps and arrays, as described in and

@@ -5269,6 +5287,10 @@ name.

because the signature of the function item fn:count#1 is a subtype of function(xs:string*) as item().

+ +

The same type might also be written + fn($x as xs:int, $y as xs:int) as xs:int.

+