diff --git a/build.gradle b/build.gradle index b009138a39..c542793585 100644 --- a/build.gradle +++ b/build.gradle @@ -568,7 +568,7 @@ task xslt_grammar( transform("${projectDir}/specifications/xslt-40/src/xslt.xml", "${projectDir}/specifications/xslt-40/style/convert-grammar.xsl", "${buildDir}/xslt-40/src/xslt-40-assembled.xml", - ["spec": "xslt-40", + ["spec": "xslt40", "grammar-file": buildDir.toURI().resolve("xslt-40/temp-xslt40-grammar.xml"), "tokens-file": buildDir.toURI().resolve("xslt-40/tokens.xml")]) } diff --git a/schema/xmlspec.dtd b/schema/xmlspec.dtd index ff03dfd557..7072a111c9 100644 --- a/schema/xmlspec.dtd +++ b/schema/xmlspec.dtd @@ -1324,7 +1324,7 @@ + ]]> - - - @@ -349,8 +347,11 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - - + + + + + @@ -584,8 +585,8 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral ft-option - - + + updating @@ -640,6 +641,13 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral + declare + + + + + + variable @@ -699,10 +707,14 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - + + declare updating + + + function ( @@ -763,6 +775,10 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral + declare + + + type as @@ -770,6 +786,11 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral + declare + + + + type record ( @@ -1218,11 +1239,9 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral some every - - - , + - + satisfies @@ -1346,31 +1365,8 @@ VersionDecl ::= "xquery" (("encoding" StringLiteral) | ("version" StringLiteral - - - - - - - - @@ -1402,7 +1398,7 @@ ErrorVal ::= "$" VarName - + @@ -1867,13 +1863,8 @@ ErrorVal ::= "$" VarName - - - + @@ -1949,19 +1940,19 @@ ErrorVal ::= "$" VarName ] - + - + ?[ ] - + ? ?? @@ -1973,7 +1964,7 @@ ErrorVal ::= "$" VarName - + pairs keys @@ -1982,19 +1973,19 @@ ErrorVal ::= "$" VarName - + - - + + - + * @@ -2003,11 +1994,11 @@ ErrorVal ::= "$" VarName --> - + - + @@ -2025,16 +2016,16 @@ ErrorVal ::= "$" VarName - + - - - + + + - + @@ -2093,8 +2084,9 @@ ErrorVal ::= "$" VarName - - + + + @@ -2407,7 +2399,8 @@ ErrorVal ::= "$" VarName - + + # @@ -2429,7 +2422,7 @@ ErrorVal ::= "$" VarName - + map @@ -2437,38 +2430,31 @@ ErrorVal ::= "$" VarName - - + : - + - + - + - + [ @@ -2476,12 +2462,12 @@ ErrorVal ::= "$" VarName ] - + array - + ` @@ -2492,7 +2478,7 @@ ErrorVal ::= "$" VarName ` - + @@ -2503,7 +2489,7 @@ ErrorVal ::= "$" VarName - + @@ -2535,7 +2521,7 @@ ErrorVal ::= "$" VarName - + ? ?? @@ -2671,7 +2657,7 @@ ErrorVal ::= "$" VarName attribute ( - + , @@ -2691,7 +2677,7 @@ ErrorVal ::= "$" VarName element ( - + , @@ -2841,40 +2827,17 @@ ErrorVal ::= "$" VarName - - , * - - enum ( - ) @@ -2898,13 +2861,6 @@ ErrorVal ::= "$" VarName ) - - ( @@ -3589,7 +3545,7 @@ ErrorVal ::= "$" VarName - + @@ -3599,7 +3555,7 @@ ErrorVal ::= "$" VarName - + diff --git a/specifications/xquery-40/src/expressions.xml b/specifications/xquery-40/src/expressions.xml index fd74b7925c..822580239e 100644 --- a/specifications/xquery-40/src/expressions.xml +++ b/specifications/xquery-40/src/expressions.xml @@ -95,8 +95,7 @@ of For example the following production rule indicates that an Expr consists of one or more occurrences of ExprSingle, separated by commas:

- - + @@ -237,13 +236,12 @@ in-scope-prefixes($e) ! namespace {.}{ namespace-uri-for-prefix(., $e)} def="EQName">EQName.

- - - + + @@ -3666,10 +3664,7 @@ defined in SequenceType syntax is used.

- - - - + @@ -4013,43 +4008,7 @@ types (such as xs:integer) and function types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -4346,9 +4305,8 @@ types (such as xs:integer) and function types

An EnumerationType accepts a fixed set of string values.

- - - + +

An has a value space consisting of a set of xs:string @@ -4629,13 +4587,8 @@ declare variable $orange-fruit as my:fruit := "orange"; - - - - - - - + + @@ -4825,9 +4778,7 @@ matches any nilled or non-nilled element node whose type annotation is Schema Element Types - - - +

@@ -4964,13 +4915,8 @@ in the following two situations: - - + - - - - @@ -5119,9 +5065,7 @@ name.

Schema Attribute Types - - - +

@@ -5216,12 +5160,7 @@ name.

- - - - - - + @@ -5391,11 +5330,9 @@ name.

either matches any map, or that matches maps whose keys and values are constrained to specific types.

- + - - - + @@ -5575,15 +5512,8 @@ name.

execution.

- - - - - - - - - + + @@ -5816,10 +5746,7 @@ declare record Particle ( are constrained to a specific type.

- - - - + @@ -8389,11 +8316,14 @@ return $f(12.3)]]> >Query Body containing an expression whose value is the result of the query. An expression is represented in the XQuery grammar by the symbol Expr.

+ + + + + + - - - - +

The &language; operator that has lowest precedence is the comma operator, which is used to combine two operands to form a sequence. @@ -8428,79 +8358,12 @@ return $f(12.3)]]> and OrExpr. Each of these expressions is described in a separate section of this document.

- + Comments - - - - + +

Comments may be used to provide information relevant to programmers who read a query, either in the .

- - - - + - +

A RangeExpression can be used to construct a sequence of integers. Each of the operands is @@ -12962,9 +12753,7 @@ every integer between the two operands, in increasing order.

Combining Node Sequences - - - +

&language; provides the following operators for combining sequences of nodes:

@@ -13088,11 +12877,7 @@ the results are the same. multiplication, division, and modulus, in their usual binary and unary forms.

- - - - - +

A subtraction operator must be preceded by whitespace if it could otherwise be interpreted as part of the previous token. For @@ -13266,8 +13051,7 @@ course to the use of parentheses. Therefore, the following two examples have dif String Concatenation Expressions - - +

String concatenation expressions allow the string representations of values to be concatenated. In &language;, $a || $b is equivalent to @@ -13287,11 +13071,7 @@ course to the use of parentheses. Therefore, the following two examples have dif - - - - - +

String templates provide an alternative way of constructing strings. For example, the expression `Pi is { round(math:pi(), 4) }` returns the string "Pi is 3.1416".

@@ -13448,11 +13228,7 @@ return `The months with 31 days are: { $longMonths }.`]]> delimiters in &language;.

- - - - - + @@ -13597,12 +13373,7 @@ declare function local:prize-message($a) as xs:string { three kinds of comparison expressions, called value comparisons, general comparisons, and node comparisons.

- - - - - - + @@ -14078,9 +13849,7 @@ side occurs before the node identified by the right side in document order:

an or-expression. If a logical expression does not raise an error, its value is always one of the boolean values true or false.

- - - +

The first step in evaluating a logical expression is to find the effective boolean value of each of its operands (see XQuery provides node constructors that can create XML nodes within a query.

- - - - - - - - - - - - - - - - - - - +

Constructors are provided for element, attribute, document, text, comment, and processing instruction nodes. Two kinds of constructors are provided: direct constructors, which use an XML-like notation that can incorporate enclosed expressions, and computed constructors, which use a notation based on enclosed expressions.

@@ -15279,14 +15030,7 @@ end of the content, or by a XQuery allows an expression to generate a processing instruction node or a comment node. This can be accomplished by using a direct processing instruction constructor or a direct comment constructor. In each case, the syntax of the constructor expression is based on the syntax of a similar construct in XML.

- - - - - - - +

A direct processing instruction constructor creates a processing instruction node whose target property is Computed Constructors - - +

An alternative way to create nodes is by using a - - - - - - +

@@ -15708,11 +15446,7 @@ element { - - - - - +

A computed attribute constructor creates a new attribute node, @@ -16031,9 +15765,7 @@ attribute { Document Node Constructors - - - +

All document node constructors are computed constructors. The result of a document node constructor is a new document node, with its own node identity.

@@ -16120,9 +15852,7 @@ attribute { Text Node Constructors - - - +

All text node constructors are computed constructors. The result of a text node constructor is a new text node, with its own node identity.

@@ -16166,11 +15896,7 @@ attribute { - - - - - +

A computed processing instruction constructor ( - - +

A computed comment constructor ( - - - - - + @@ -16725,52 +16446,13 @@ element because it is defined by a for, let, where, order by, and return, which introduce some of the clauses used in FLWOR expressions (but this is not a complete list of such clauses.)

-

The complete syntax of a FLWOR expression is shown here, and relevant parts - of the syntax are repeated in subsequent sections of this document.

+

The overall syntax of a FLWOR expression is shown here, and relevant parts + of the syntax are expanded in subsequent sections.

XPath provides two closely-related expressions, called For and Let - expressions, that can be used to bind variables to values. The complete syntax is shown - here, and relevant parts - of the syntax are repeated in subsequent sections of this document.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + expressions, that can be used to bind variables to values. These are described in the + following sections.

+ +

The semantics of FLWOR expressions are based on a concept called a tuple stream. - - - - - - - - - - +

A for clause is used for iteration. Each variable in a for clause iterates over a sequence, an array, or a map.

@@ -17231,10 +16904,7 @@ for member $y in $expr2]]> - - -

The purpose of a let clause is to bind values to one or more variables. Each variable is bound to the result of evaluating an expression.

If a let clause contains multiple variables, it is semantically equivalent to multiple let clauses, each containing a single variable. For example, the clause

@@ -17267,19 +16937,7 @@ let $e := doc("emps.xml")/emps/emp[deptno eq $d]]]> - - - - - - - - - - - -

Like a for clause, a window clause @@ -17832,8 +17490,7 @@ group by $symbol]]> Where Clause - - +

A where clause serves as a filter for the tuples in its input tuple stream. The expression in the where clause, called the where-expression, is evaluated once for each of these tuples. If the - - +

A while clause serves as a filter for the tuples @@ -17963,8 +17619,7 @@ return $x]]> Count Clause - - +

The purpose of a count clause is to enhance the tuple @@ -18036,10 +17691,7 @@ return <product rank="{ $rank }">{ $p/name, $p/sales }</product> Group By Clause - - - @@ -18425,12 +18077,9 @@ return $product/@code Order By Clause - - - - - + +

The purpose of an order by clause is to impose a value-based ordering on the tuples in the tuple stream. The output tuple stream of the order by clause contains the same tuples as its input tuple stream, but the tuples may be in a different order.

An order by clause contains one or more ordering specifications, called Return Clause - - - +

The return clause is the final clause of a FLWOR expression. The return clause is evaluated once for each tuple in its input tuple stream, using the variable bindings in the respective tuples, in the order in which these tuples appear in the input tuple stream. The results of these evaluations are concatenated, as if by the comma operator, to form the result of the FLWOR expression.

@@ -18834,16 +18481,7 @@ return ($i, $j)]]> members of an array, or the entries in a map.

- - - - - - - - -

A for expression is evaluated as follows:

@@ -19092,12 +18730,7 @@ return $line/value]]>

XPath allows a variable to be declared and bound to a value using a let expression.

- - - - -

A let expression is evaluated as follows:

@@ -19234,11 +18867,7 @@ processing with JSON processing.

A map can be created using a MapConstructor.

- - - - - + @@ -19515,10 +19144,7 @@ processing with JSON processing.

An array is created using an ArrayConstructor.

- - - - +

@@ -19707,14 +19333,7 @@ processing with JSON processing.

Postfix Lookup Expressions - - - - - - - - +

A Lookup has two parts: the KeySpecifier @@ -20003,12 +19622,7 @@ processing with JSON processing.

Unary Lookup - - - - - - + @@ -20503,8 +20117,7 @@ declare function recursive-content($item as item()) as record(key, value)* { - - +

Maps and arrays can be filtered using the construct INPUT?[FILTER]. @@ -20667,10 +20280,7 @@ return $map?[?key ge 2] - - - - + @@ -20704,15 +20314,8 @@ return $map?[?key ge 2]

&language; allows conditional expressions to be written in several different ways.

- - - - - - - + +

The braced expression if (C) then {T} is equivalent to the @@ -20816,8 +20419,7 @@ else - - +

The otherwise expression returns the value of its first operand, unless this is an empty @@ -20858,13 +20460,7 @@ else - - - - - - - +

The switch expression chooses one of several expressions to evaluate based on the @@ -20977,12 +20573,11 @@ switch () {

Quantified expressions support existential and universal quantification. The value of a quantified expression is always true or false.

+ - - - - + +

A quantified expression begins with a quantifier, which is the keyword some or every, followed by one or more in-clauses that are used to bind variables, @@ -21172,14 +20767,7 @@ raised by the XQuery implementation and errors explicitly raised in a query using the fn:error() function.

- - - - - - - - + @@ -21460,8 +21048,7 @@ type. Instance Of - - +

The boolean operator instance of @@ -21548,12 +21135,7 @@ matching; otherwise it returns false. For example:

- - - - - - +

The typeswitch expression chooses one of @@ -21669,11 +21251,7 @@ be used to process an expression in a way that depends on its Cast - - - - - +

Sometimes it is necessary to convert a value to a specific datatype. For this @@ -21811,14 +21389,11 @@ The result of a cast expression is one of the following: Castable + - - - - - - + +

&language; provides an expression that tests whether a given value is castable into a given target type. @@ -21976,10 +21551,11 @@ usa:zipcode?).

Treat + - - + +

&language; provides an expression called treat that can be used to modify the - - +

@@ -22306,17 +21881,7 @@ return string-join($chopped, '; ') left-hand expression as the first argument to the function.

- - - - - - - - - - - +

The arrow syntax is particularly helpful when applying multiple @@ -22547,10 +22112,7 @@ return $rectangle =?> area() - - - - +

A validate expression can be used to validate a @@ -22869,10 +22431,7 @@ so that fallback behavior can be defined for implementations that do not recognize a particular extension.

- - - - +

An extension expression consists of one or more pragmas, followed by an optional expression (the associated expression). In the grammar productions in this document, named symbols are underlined and literal text is enclosed in double quotes. For example, the following productions describe the syntax of a static function call:

- - + -

The productions should be read as follows: A function call consists of an EQName followed by an ArgumentList. The diff --git a/specifications/xquery-40/src/query-prolog.xml b/specifications/xquery-40/src/query-prolog.xml index d1f69d2306..ea2bd9d7de 100644 --- a/specifications/xquery-40/src/query-prolog.xml +++ b/specifications/xquery-40/src/query-prolog.xml @@ -2,16 +2,7 @@ Modules and Prologs - - - - - - - - - - +

A query can be assembled from one or more fragments called modules. A module is a fragment of XQuery code that conforms @@ -62,8 +53,7 @@ Version Declaration - - +

@@ -168,8 +158,7 @@ Module Declaration - - +

A module @@ -205,8 +194,7 @@ Boundary-space Declaration - - +

A boundary-space @@ -227,9 +215,7 @@ Default Collation Declaration - - - +

A default @@ -258,8 +244,7 @@ Base URI Declaration - - +

@@ -307,9 +292,7 @@ Construction Declaration - - - +

A construction @@ -338,9 +321,7 @@ - - - +

The ordering mode declaration is retained from earlier XQuery versions, @@ -356,9 +337,7 @@ Empty Order Declaration - - - +

An empty order @@ -380,10 +359,7 @@ Copy-Namespaces Declaration - - - - +

@@ -417,9 +393,7 @@ declaration">A - - - +

@@ -509,10 +483,7 @@ return ( - - - - + @@ -691,9 +662,7 @@ return ( Module Import - - - +

A module import imports the @@ -905,10 +874,7 @@ $triangle - - - - +

@@ -999,9 +965,7 @@ return $node/xx:bing]]> - - - +

Default namespace declarations can be used in a Annotations - - - - - +

XQuery uses annotations to declare properties associated with functions (inline or declared @@ -1195,20 +1155,12 @@ return $node/xx:bing]]> - - - - - - - - - + -

A variable declaration +

A variable declaration in the XQuery prolog defines the name and static type of a variable, and optionally a value for the variable. It adds to the in-scope @@ -1438,8 +1390,7 @@ declare function local:f() { $b }; - - + @@ -1598,17 +1549,8 @@ declare context value as document-node()* := collection($uri); - - - - - - - - - - - + +

A function declaration specifies whether the implementation of the function @@ -1945,10 +1887,7 @@ local:depth(doc("partlist.xml")) the in full.

- - - - +

An item type declaration adds a to the @@ -2047,13 +1986,7 @@ local:depth(doc("partlist.xml"))

The syntax is as follows:

- - - - - - - +

A named record declaration serves as both a and as a @@ -2308,11 +2241,9 @@ return $box =?> area() implementation. Each option consists of an identifying EQName and a StringLiteral.

- - - - + +

Typically, a particular option will be recognized by some implementations and not by others. The syntax is designed so that option declarations can be successfully parsed by all implementations.

diff --git a/specifications/xslt-40/src/xslt.xml b/specifications/xslt-40/src/xslt.xml index e939395b86..e8621c2d0f 100644 --- a/specifications/xslt-40/src/xslt.xml +++ b/specifications/xslt-40/src/xslt.xml @@ -1,9 +1,8 @@ - +
XSL Transformations (XSLT) @@ -9720,23 +9719,7 @@ and version="1.0" otherwise.

variables are defined by the variable binding elements that are in scope for the containing element (see ).

- +

The statically known function definitions are:

@@ -10716,20 +10699,16 @@ and version="1.0" otherwise.

Where an attribute is defined to contain a pattern, it is a static error if the pattern does not match the production Pattern40.

-

The grammar for patterns uses the notation defined in Notation.

+

The complete grammar for patterns is listed in . + It uses the notation defined in Notation.

The lexical rules for patterns are the same as the lexical rules for XPath expressions, as defined in Lexical structure. Comments are permitted between tokens, using the syntax (: ... :). All other provisions of the XPath grammar apply where relevant, for example the rules for whitespace handling and extra-grammatical constraints.

- - - - - - - + +

Patterns fall into three groups:

@@ -10754,9 +10733,7 @@ and version="1.0" otherwise.

Predicate Patterns - -

A PredicatePattern @@ -10806,21 +10783,7 @@ and version="1.0" otherwise.

- - - - - - - - - - - - - - @@ -10888,26 +10851,7 @@ and version="1.0" otherwise.

- - - - - - - - - - - - - - - - - - -

Node Patterns are used to match XDM nodes.

@@ -19299,13 +19243,8 @@ and version="1.0" otherwise.

The for the initializing expression of an optional parameter of an xsl:function declaration - is the same as the static context for a , - with the following exceptions:

- - - -

The is item()*.

-
+ is the same as the static context for a .

+

The for the initializing expression of an optional parameter @@ -25689,7 +25628,7 @@ the same group, and the-->

An alternative solution to this requirement is to use map constructors: see - .

+ .

@@ -33467,7 +33406,7 @@ the same group, and the--> Streamability of Map Constructors

The and of a map - constructor (see ) are the same as the + constructor (see ) are the same as the and of the equivalent xsl:map instruction. The equivalent xsl:map instruction is formed by creating a sequence of @@ -35895,79 +35834,7 @@ the same group, and the--> - - Map Constructors -

A Map Constructor is a new kind of expression added to the syntax of XPath.

- -

Map Constructors are defined in XPath 3.1. They are available in XSLT 3.0 whether - or not XPath 3.1 is supported. The specification given here is intended to be - identical to the specification in XPath 3.1.

-
-

The syntax of PrimaryExpr is - extended to permit MapConstructor as an additional alternative.

- - - MapConstructor - - - PrimaryExpr - Literal | VarRef | ParenthesizedExpr | ContextItemExpr | FunctionCall | - FunctionItemExpr
| MapConstructor
-
- - - MapConstructor - "map" "{" (MapConstructorEntry ("," MapConstructorEntry )*)? "}" - - - MapConstructorEntry - MapKeyExpr ":" MapValueExpr - - - MapKeyExpr - ExprSingle - - - MapValueExpr - ExprSingle - -
-
- - - - -

In some circumstances, it is necessary to include whitespace - before or after the colon to ensure that this grammar is correctly parsed; this - arises for example when the KeyExpr ends with a name and the - ValueExpr starts with a name.

-
- -

The value of the expression is a map whose entries correspond to the key-value pairs - obtained by evaluating the successive KeyExpr and ValueExpr - expressions.

-

Each KeyExpr expression is evaluated and atomized; a type error occurs if the result is not a single atomic item. If the key is of - type xs:untypedAtomic it is converted to xs:string. The - associated value is the result of evaluating the corresponding - ValueExpr. If two or more entries have the same key then - a dynamic error occurs .

-

For example, the following expression constructs a map with seven entries:

- -{ - "Su" : "Sunday", - "Mo" : "Monday", - "Tu" : "Tuesday", - "We" : "Wednesday", - "Th" : "Thursday", - "Fr" : "Friday", - "Sa" : "Saturday" -} - -

Unlike the map:merge function, the number of entries in a map - that is constructed using a map expression is known statically.

-
- - + Maps and Streaming @@ -39541,6 +39408,42 @@ See + + Pattern Syntax Summary + +

This appendix gives the grammar for XSLT patterns. The top-level rule for + patterns is .

+ +

This is an extension of the grammar for XPath expressions. + The extended BNF notation is explained at .

+ +

Productions that are identical to their counterparts in XPath 4.0 are suffixed + XP and link to the corresponding production in the XPath 4.0 specification. + Productions whose names end with P are restrictions of the corresponding + XPath production: for example, ArgumentListP is a restricted form of the + XPath production ArgumentList.

+ + + + + + + + + + Terminal Symbols + + + + +

The following symbols represent portions of terminal symbols; they are not + themselves terminal symbols referenced in the grammar.

+ + + + +
+
Checklist of Implementation-Defined Features

This appendix provides a summary of XSLT language features whose effect is explicitly diff --git a/specifications/xslt-40/style/convert-grammar.xsl b/specifications/xslt-40/style/convert-grammar.xsl index 541d86140b..3cac9b9872 100644 --- a/specifications/xslt-40/style/convert-grammar.xsl +++ b/specifications/xslt-40/style/convert-grammar.xsl @@ -52,27 +52,5 @@ - - diff --git a/specifications/xslt-40/style/xslt.xsl b/specifications/xslt-40/style/xslt.xsl index 0637681b2a..0f820522e7 100644 --- a/specifications/xslt-40/style/xslt.xsl +++ b/specifications/xslt-40/style/xslt.xsl @@ -82,7 +82,8 @@ - + + diff --git a/specifications/xslt-xquery-serialization-40/src/xslt-xquery-serialization.xml b/specifications/xslt-xquery-serialization-40/src/xslt-xquery-serialization.xml index 80429956c6..dbfa423e51 100644 --- a/specifications/xslt-xquery-serialization-40/src/xslt-xquery-serialization.xml +++ b/specifications/xslt-xquery-serialization-40/src/xslt-xquery-serialization.xml @@ -3836,11 +3836,11 @@ described in .

An array item is serialized using the syntax -of a , -that is as [member,member, ... ]. The members, which in general are sequences, -are serialized in the form (item,item, ...) where the items are serialized by +of a , +that is as [member, member, ... ]. The members, which in general are sequences, +are serialized in the form (item, item, ...) where the items are serialized by applying these rules recursively. The items are separated by commas -(not by the item-separator character). The enclosing parentheses are optional if the sequence +(not by the item-separator character). The enclosing parentheses are optional if the sequence has length one.

The serializer should avoid outputting the parentheses if it is able to determine the length of the sequence before serializing the first item; but it is allowed diff --git a/style/assemble-spec.xsl b/style/assemble-spec.xsl index 1617c6a707..c163557709 100644 --- a/style/assemble-spec.xsl +++ b/style/assemble-spec.xsl @@ -13,9 +13,10 @@ --> @@ -25,7 +26,7 @@ - + @@ -90,46 +91,22 @@ - - - - - - - - - - - - - - - - - - - + - - - + - @@ -138,20 +115,45 @@ - - - - - + + + + + + + + + + + + + + + + *** Duplicate prodrecap {@ref} *** + + + + + example- + + + + DEBUG: template match="prodrecap" starting @@ -162,62 +164,19 @@ - + - - - - - - DEBUG: template match="prodrecap" ... - $fn = '' - $grammar = [the document at $fn] - $orig = '' - - - - - - - - - - - - - - - - - DEBUG: template match="prodrecap" ... - Calling template "show-prod" - with parameters: - name = - orig = - result_id_noid_part = - - - - + + - - + - - - DEBUG: template match="prodrecap" exiting - - - @@ -363,42 +322,28 @@ - + - - - - - - - - prod- - - - doc- - + doc- + prod- + - + - + $spec = {$spec} diff --git a/style/grammar2spec.xsl b/style/grammar2spec.xsl index 6a9826710a..dc77c5654f 100644 --- a/style/grammar2spec.xsl +++ b/style/grammar2spec.xsl @@ -6,8 +6,8 @@ + xmlns:xs="http://www.w3.org/2001/XMLSchema" + exclude-result-prefixes="g xs"> - - - - - - - - - + @@ -231,7 +215,9 @@ - + + @@ -251,7 +237,7 @@ - + @@ -269,9 +255,6 @@ [not(g:string and count(*)=1)] [@name=$ordinary-rules//g:ref/@name]"/> - @@ -290,10 +273,6 @@ - @@ -456,11 +435,8 @@ - - + + @@ -533,38 +509,42 @@ - - - - + + - - - + + - + + + - - + + @@ -574,85 +554,132 @@ WARNING!! production with name="" not found + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - + + - + @@ -671,10 +698,8 @@ XML - - Can't figure out spec for: - - + Can't figure out spec for: {@xhref} @@ -683,16 +708,12 @@ ] - - [] - + - - - + - @@ -714,11 +735,10 @@ these annotations were omitted from the EBNF in the main body of the doc "to increase readability". - But in the 3.1 series (and hypothetical future series), - we show the annotations in the main body too. + But from 3.1 we show the annotations in the main body too. See Bug 29702. --> - + @@ -743,6 +763,7 @@ + @@ -879,19 +900,12 @@ - - +   @@ -1006,57 +1020,16 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1197,23 +1170,6 @@ ] - @@ -1325,24 +1281,6 @@ - - - - - - - - - - - - - - - - - - @@ -1363,7 +1301,7 @@ - + @@ -1379,10 +1317,8 @@ - - + - @@ -1396,10 +1332,6 @@ - @@ -1542,7 +1474,8 @@ --> - + + @@ -1553,7 +1486,8 @@ - + + @@ -1587,27 +1521,12 @@ wasn't necessary, since stringifying a node-set only stringifies the doc-order-first of its nodes.) --> - + - - - - - - - - - - - - - + @@ -1645,7 +1564,7 @@ --> - + doc- @@ -1673,6 +1592,7 @@ + $idref_lang_part = {$idref_lang_part} + diff --git a/style/xmlspec-2016.xsl b/style/xmlspec-2016.xsl index be0f9a79f0..7b720b2a24 100644 --- a/style/xmlspec-2016.xsl +++ b/style/xmlspec-2016.xsl @@ -1230,17 +1230,30 @@ --> + - - + + - + - + + + + + + + + + + diff --git a/style/xmlspec-override.xsl b/style/xmlspec-override.xsl index c9503c2ae5..8b8f6c1d50 100644 --- a/style/xmlspec-override.xsl +++ b/style/xmlspec-override.xsl @@ -14,12 +14,6 @@ ... which see for decls of 'show-markup', 'show.diff.markup', etc. --> - - @@ -42,27 +36,6 @@ - - - - - - @@ -210,15 +183,17 @@ - - + + -\-> - + -\-> - + -\-> - + Warning: link-text-with-check was unable to make a link for $ref-id="" - + -\->--> diff --git a/style/xsl-query-2016.xsl b/style/xsl-query-2016.xsl index aabad1decd..10dbf5b70b 100644 --- a/style/xsl-query-2016.xsl +++ b/style/xsl-query-2016.xsl @@ -4,7 +4,7 @@ xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:my="http://www.w3.org/qtspecs/build/functions" exclude-result-prefixes="my xs" - version="2.0" + version="3.0" > @@ -947,20 +947,10 @@ - - Error: cannot resolve xnt - - in - - at id= - - + Error: cannot resolve xnt {@ref} in {@spec + } at id={(ancestor::*/@id)[last()]} - [NT - - IN - - ] + [NT {@ref} IN {@spec}] @@ -1169,14 +1159,9 @@ else key('ids', $doc-def)"/> - - Error: cannot resolve nt: - - + Error: cannot resolve nt: {@def} at {(ancestor::*/@id)[last()]} - [ERROR: no - - ] + [ERROR: no nt {@def}] @@ -1195,6 +1180,26 @@ + + + + + + + + + + + + + + + + + + + +