XQuery 3.1 Grammar

QueryList::=Module ("%%%" Module)
AbbrevForwardStep::="@" NodeTest
AbbrevReverseStep::=".."
AllowingEmpty::="allowing" "empty"
AmpersandError::="&"
AnnotatedDecl::="declare" (Annotation) (VarDecl | FunctionDecl)
Annotation::="%" _QName_or_EQName ("(" Literal ("," Literal) ")")
AnyArrayTest::="array" "(" "*" ")"
AnyFunctionTest::="function" "(" "*" ")"
AnyKindTest::="node" "(" ")"
AnyMapTest::="map" "(" "*" ")"
AposAttrContentChar::=Char
AposAttrValueContent::=(AposAttrContentChar | CommonContent)
Argument::=(ExprSingle | ArgumentPlaceholder)
ArgumentList::="(" (Argument ("," Argument)) ")"
ArgumentPlaceholder::="?"
ArrayConstructor::=(SquareArrayConstructor | CurlyArrayConstructor)
ArrayTest::=(AnyArrayTest | TypedArrayTest)
ArrowFunctionSpecifier::=(EQName | VarRef | ParenthesizedExpr)
Ascending::="ascending"
AtomicOrUnionType::=_QName_or_EQName
AttribNameOrWildcard::=(AttributeName | "*")
AttributeDeclaration::=AttributeName
AttributeName::=_QName_or_EQName
AttributeTest::="attribute" "(" (AttribNameOrWildcard ("," TypeName)) ")"
AxisStep::=(ReverseStep | ForwardStep) PredicateList
BaseChar::=[AAZZ aazz ÀÀÖÖ ØØöö øøÿÿ ĀĀıı ĴĴľľ ŁŁňň ŊŊžž ƀƀǃǃ ǍǍǰǰ ǴǴǵǵ ǺǺȗȗ ɐɐʨʨ ʻʻˁˁ ΆΆ ΈΈΊΊ ΌΌ ΎΎΡΡ ΣΣώώ ϐϐϖϖ ϚϚ ϜϜ ϞϞ ϠϠ ϢϢϳϳ ЁЁЌЌ ЎЎяя ёёќќ ўўҁҁ ҐҐӄӄ ӇӇӈӈ ӋӋӌӌ ӐӐӫӫ ӮӮӵӵ ӸӸӹӹ ԱԱՖՖ ՙՙ աաֆֆ אאתת װװײײ ءءغغ ففيي ٱٱڷڷ ںںھھ ۀۀێێ ېېۓۓ ەە ۥۥۦۦ अह ऽ क़ॡ অঌ এঐ ওন পর ল শহ ড়ঢ় য়ৡ ৰৱ ਅਊ ਏਐ ਓਨ ਪਰ ਲਲ਼ ਵਸ਼ ਸਹ ਖ਼ੜ ਫ਼ ੲੴ અઋ ઍ એઑ ઓન પર લળ વહ ઽ ૠ ଅଌ ଏଐ ଓନ ପର ଲଳ ଶହ ଽ ଡ଼ଢ଼ ୟୡ அஊ எஐ ஒக ஙச ஜ ஞட ணத நப மவ ஷஹ అఌ ఎఐ ఒన పళ వహ ౠౡ ಅಌ ಎಐ ಒನ ಪಳ ವಹ ೞ ೠೡ അഌ എഐ ഒന പഹ ൠൡ กฮ ะ าำ เๅ ກຂ ຄ ງຈ ຊ ຍ ດທ ນຟ ມຣ ລ ວ ສຫ ອຮ ະ າຳ ຽ ເໄ ཀཇ ཉཀྵ ႠჅ აჶ ᄀ ᄂᄃ ᄅᄇ ᄉ ᄋᄌ ᄎᄒ ᄼ ᄾ ᅀ ᅌ ᅎ ᅐ ᅔᅕ ᅙ ᅟᅡ ᅣ ᅥ ᅧ ᅩ ᅭᅮ ᅲᅳ ᅵ ᆞ ᆨ ᆫ ᆮᆯ ᆷᆸ ᆺ ᆼᇂ ᇫ ᇰ ᇹ Ḁẛ Ạỹ ἀἕ ἘἝ ἠὅ ὈὍ ὐὗ Ὑ Ὓ Ὕ Ὗώ ᾀᾴ ᾶᾼ ι ῂῄ ῆῌ ῐΐ ῖΊ ῠῬ ῲῴ ῶῼ Ω KÅ ℮ ↀↂ ぁゔ ァヺ ㄅㄬ 가힣 ]
BaseURIDecl::="declare" "base-uri" URILiteral
BoundarySpaceDecl::="declare" "boundary-space" ("preserve" | "strip")
BracedURILiteral::="Q" "{" (PredefinedEntityRef | CharRef | [&{}]) "}"
CaseClause::="case" ("$" VarName "as") SequenceTypeUnion "return" ExprSingle
CatchClause::="catch" CatchErrorList EnclosedExpr
CatchErrorList::=NameTest ("|" NameTest)
CDataSection::=CdataSectionStart CDataSectionContents CdataSectionEnd
CDataSectionContents::=Char
CdataSectionEnd::="]]>"
CdataSectionStart::="<![CDATA["
Char::=[&#x0009; &#x000D; &#x000A; &#x0020; &#xFFFD; ]
CharRef::="&#" (Digits | ("x" HexDigits)) ";"
CloseApos::="'"
CloseQuot::="""
CombiningChar::=[&#x0300;&#x0345; &#x0360;&#x0361; &#x0483;&#x0486; &#x0591;&#x05a1; &#x05a3;&#x05b9; &#x05bb;&#x05bd; &#x05bf; &#x05c1;&#x05c2; &#x05c4; &#x064b;&#x0652; &#x0670; &#x06d6;&#x06dc; &#x06dd;&#x06df; &#x06e0;&#x06e4; &#x06e7;&#x06e8; &#x06ea;&#x06ed; &#x0901;&#x0903; &#x093c; &#x093e;&#x094c; &#x094d; &#x0951;&#x0954; &#x0962;&#x0963; &#x0981;&#x0983; &#x09bc; &#x09be; &#x09bf; &#x09c0;&#x09c4; &#x09c7;&#x09c8; &#x09cb;&#x09cd; &#x09d7; &#x09e2;&#x09e3; &#x0a02; &#x0a3c; &#x0a3e; &#x0a3f; &#x0a40;&#x0a42; &#x0a47;&#x0a48; &#x0a4b;&#x0a4d; &#x0a70;&#x0a71; &#x0a81;&#x0a83; &#x0abc; &#x0abe;&#x0ac5; &#x0ac7;&#x0ac9; &#x0acb;&#x0acd; &#x0b01;&#x0b03; &#x0b3c; &#x0b3e;&#x0b43; &#x0b47;&#x0b48; &#x0b4b;&#x0b4d; &#x0b56;&#x0b57; &#x0b82;&#x0b83; &#x0bbe;&#x0bc2; &#x0bc6;&#x0bc8; &#x0bca;&#x0bcd; &#x0bd7; &#x0c01;&#x0c03; &#x0c3e;&#x0c44; &#x0c46;&#x0c48; &#x0c4a;&#x0c4d; &#x0c55;&#x0c56; &#x0c82;&#x0c83; &#x0cbe;&#x0cc4; &#x0cc6;&#x0cc8; &#x0cca;&#x0ccd; &#x0cd5;&#x0cd6; &#x0d02;&#x0d03; &#x0d3e;&#x0d43; &#x0d46;&#x0d48; &#x0d4a;&#x0d4d; &#x0d57; &#x0e31; &#x0e34;&#x0e3a; &#x0e47;&#x0e4e; &#x0eb1; &#x0eb4;&#x0eb9; &#x0ebb;&#x0ebc; &#x0ec8;&#x0ecd; &#x0f18;&#x0f19; &#x0f35; &#x0f37; &#x0f39; &#x0f3e; &#x0f3f; &#x0f71;&#x0f84; &#x0f86;&#x0f8b; &#x0f90;&#x0f95; &#x0f97; &#x0f99;&#x0fad; &#x0fb1;&#x0fb7; &#x0fb9; &#x20d0;&#x20dc; &#x20e1; &#x302a;&#x302f; &#x3099; &#x309a; ]
Comment::=CommentStart (CommentContents | Comment) CommentEnd
CommentContent::=Char
CommentContents::=CommentContent
CommentEnd::=":)"
CommentStart::="(:"
CommentTest::="comment" "(" ")"
CommonContent::=(PredefinedEntityRef | CharRef | LCurlyBraceEscape | RCurlyBraceEscape | EnclosedExpr)
CompAttrConstructor::="attribute" (_QName_or_EQName | (Lbrace Expr Rbrace)) EnclosedExpr
CompCommentConstructor::="comment" EnclosedExpr
CompDocConstructor::="document" EnclosedExpr
CompElemConstructor::="element" (_QName_or_EQName | (Lbrace Expr Rbrace)) EnclosedContentExpr
CompNamespaceConstructor::="namespace" (Prefix | EnclosedPrefixExpr) EnclosedURIExpr
CompPIConstructor::="processing-instruction" (NCName | (Lbrace Expr Rbrace)) EnclosedExpr
CompTextConstructor::="text" EnclosedExpr
ComputedConstructor::=(CompDocConstructor | CompElemConstructor | CompAttrConstructor | CompNamespaceConstructor | CompTextConstructor | CompCommentConstructor | CompPIConstructor)
ConstructionDecl::="declare" "construction" ("strip" | "preserve")
ContextItemDecl::="declare" "context" "item" ("as" ItemType) ((":=" VarValue) | (External (":=" VarDefaultValue)))
ContextItemExpr::="."
CopyNamespacesDecl::="declare" "copy-namespaces" PreserveMode "," InheritMode
CountClause::="count" "$" VarName
CurlyArrayConstructor::="array" EnclosedExpr
CurrentItem::=_QName_or_EQName
DecimalFormatDecl::="declare" (("decimal-format" _QName_or_EQName) | ("default" "decimal-format")) (DFPropertyName "=" StringLiteral)
DecimalLiteral::=(("." Digits) | (Digits "." [09]))
DefaultCollationDecl::="declare" "default" "collation" URILiteral
DefaultNamespaceDecl::="declare" "default" ("element" | "function") "namespace" URILiteral
Descending::="descending"
DFPropertyName::=("decimal-separator" | "grouping-separator" | "infinity" | "minus-sign" | "NaN" | "percent" | "per-mille" | "zero-digit" | "digit" | "pattern-separator" | "exponent-separator")
Digit::=[&#x0030;0&#x0039;9 &#x0660;٠&#x0669;٩ &#x06f0;۰&#x06f9;۹ &#x0966;&#x096f; &#x09e6;&#x09ef; &#x0a66;&#x0a6f; &#x0ae6;&#x0aef; &#x0b66;&#x0b6f; &#x0be7;&#x0bef; &#x0c66;&#x0c6f; &#x0ce6;&#x0cef; &#x0d66;&#x0d6f; &#x0e50;&#x0e59; &#x0ed0;&#x0ed9; &#x0f20;&#x0f29; ]
Digits::=[09]
DirAttributeList::=(S (TagQName S ValueIndicator S DirAttributeValue))
DirAttributeValue::=((OpenQuot (EscapeQuot | QuotAttrValueContent) CloseQuot) | (OpenApos (EscapeApos | AposAttrValueContent) CloseApos))
DirCommentConstructor::=DirCommentStart DirCommentContents DirCommentEnd
DirCommentContentChar::=Char
DirCommentContentDashChar::=- Char
DirCommentContentDoubleDashError::=- -
DirCommentContents::=(DirCommentContentChar | DirCommentContentDashChar)
DirCommentEnd::="-->"
DirCommentStart::="<!--"
DirectConstructor::=(DirElemConstructor | DirCommentConstructor | DirPIConstructor)
DirElemConstructor::=LeftAngleBracket TagQName DirAttributeList (EmptyTagClose | (StartTagClose DirElemContent EndTagOpen EndTagQName S EndTagClose))
DirElemContent::=(DirectConstructor | CDataSection | CommonContent | ElementContentChar)
DirPIConstructor::=ProcessingInstructionStart PITarget (S DirPIContents) ProcessingInstructionEnd
DirPIContents::=Char
DocumentTest::="document-node" "(" (ElementTest | SchemaElementTest) ")"
DoubleLiteral::=(("." Digits) | (Digits ("." [09]))) [eE] [+-] Digits
ElementContentChar::=Char
ElementDeclaration::=ElementName
ElementName::=_QName_or_EQName
ElementNameOrWildcard::=(ElementName | "*")
ElementTest::="element" "(" (ElementNameOrWildcard ("," TypeName "?")) ")"
EmptyOrderDecl::="declare" "default" "order" "empty" (Greatest | Least)
EmptyTagClose::="/>"
EnclosedContentExpr::=EnclosedExpr
EnclosedExpr::=Lbrace Expr Rbrace
EnclosedPrefixExpr::=EnclosedExpr
EnclosedTryTargetExpr::=EnclosedExpr
EnclosedURIExpr::=EnclosedExpr
EndTagClose::=">"
EndTagOpen::="</"
EndTagQName::=QNameToken
EQName::=(QName | URIQualifiedName)
EscapeApos::="''"
EscapeQuot::=""""
Expr::=ExprSingle ("," ExprSingle)
ExprSingle::=(FLWORExpr11 | QuantifiedExpr | SwitchExpr | TypeswitchExpr | IfExpr | TryCatchExpr | OrExpr)
Extender::=[&#x00b7;· &#x02d0;ː &#x02d1;ˑ &#x0387;· &#x0640;ـ &#x0e46; &#x0ec6; &#x3005; &#x3031;&#x3035; &#x309d;&#x309e; &#x30fc;&#x30fe; ]
ExtensionExpr::=Pragma Lbrace Expr Rbrace
External::="external"
FLWORExpr11::=InitialClause IntermediateClause ReturnClause
ForBinding::="$" VarName TypeDeclaration AllowingEmpty PositionalVar "in" ExprSingle
ForClause::="for" ForBinding ("," ForBinding)
ForwardAxis::=(("child" "::") | ("descendant" "::") | ("attribute" "::") | ("self" "::") | ("descendant-or-self" "::") | ("following-sibling" "::") | ("following" "::"))
ForwardStep::=((ForwardAxis NodeTest) | AbbrevForwardStep)
FunctionBody::=EnclosedExpr
FunctionCall::=_Function_QName_or_EQName (ArgumentList)
FunctionDecl::="function" _Function_QName_or_EQName "(" ParamList ")" ("as" SequenceType) (FunctionBody | External)
FunctionEQName::=(FunctionQName | URIQualifiedName)
FunctionItemExpr::=(NamedFunctionRef | InlineFunctionExpr)
FunctionQName::=(QNameToken | Ascending | Descending | External | Greatest | Least | "NaN" | "allowing" | "ancestor" | "ancestor-or-self" | "and" | "as" | "at" | "base-uri" | "boundary-space" | "by" | "case" | "cast" | "castable" | "catch" | "child" | "collation" | "construction" | "context" | "copy-namespaces" | "count" | "decimal-format" | "decimal-separator" | "declare" | "default" | "descendant" | "descendant-or-self" | "digit" | "div" | "document" | "else" | "empty" | "encoding" | "end" | "eq" | "every" | "except" | "exponent-separator" | "following" | "following-sibling" | "for" | "ge" | "group" | "grouping-separator" | "gt" | "idiv" | "import" | "in" | "infinity" | "inherit" | "instance" | "intersect" | "is" | "lax" | "le" | "let" | "lt" | "minus-sign" | "mod" | "module" | "namespace" | "ne" | "next" | "no-inherit" | "no-preserve" | "of" | "only" | "option" | "or" | "order" | "ordered" | "ordering" | "parent" | "pattern-separator" | "per-mille" | "percent" | "preceding" | "preceding-sibling" | "preserve" | "previous" | "return" | "satisfies" | "schema" | "self" | "sliding" | "some" | "stable" | "start" | "strict" | "strip" | "then" | "to" | "treat" | "try" | "tumbling" | "type" | "union" | "unordered" | "validate" | "variable" | "version" | "when" | "where" | "window" | "xquery" | "zero-digit")
FunctionTest::=Annotation (AnyFunctionTest | TypedFunctionTest)
GeneralComp::=("=" | "!=" | LeftAngleBracket | "<=" | ">" | ">=")
Greatest::="greatest"
GroupByClause::="group" "by" GroupingSpecList
GroupingSpec::=GroupingVariable (TypeDeclaration ":=" ExprSingle) ("collation" URILiteral)
GroupingSpecList::=GroupingSpec ("," GroupingSpec)
GroupingVariable::="$" VarName
HexDigits::=[09afAF]
Ideographic::=[&#x4e00;&#x9fa5; &#x3007; &#x3021;&#x3029; ]
IfExpr::="if" "(" Expr ")" "then" ExprSingle "else" ExprSingle
ImplicitlyAllowedWhitespace::=WhitespaceChar
Import::=(SchemaImport | ModuleImport)
InheritMode::=("inherit" | "no-inherit")
InitialClause::=(ForClause | LetClause | WindowClause)
InlineFunctionExpr::=Annotation "function" "(" ParamList ")" ("as" SequenceType) FunctionBody
IntegerLiteral::=Digits
IntermediateClause::=(InitialClause | WhereClause | GroupByClause | OrderByClause | CountClause)
ItemType::=(KindTest | ("item" "(" ")") | FunctionTest | MapTest | ArrayTest | AtomicOrUnionType | ParenthesizedItemType)
KeySpecifier::=(NCName | IntegerLiteral | ParenthesizedExpr | "*")
KindTest::=(DocumentTest | ElementTest | AttributeTest | SchemaElementTest | SchemaAttributeTest | PITest | CommentTest | TextTest | NamespaceNodeTest | AnyKindTest)
Lbrace::="{"
LCurlyBraceEscape::="{{"
Least::="least"
LeftAngleBracket::="<"
LeftAngleBracketError::="<"
LetBinding::=(("$" VarName TypeDeclaration)) ":=" ExprSingle
LetClause::="let" LetBinding ("," LetBinding)
Letter::=(BaseChar | Ideographic)
LibraryModule::=ModuleDecl Prolog
Literal::=(NumericLiteral | StringLiteral)
LocalPart::=NCNameTok
Lookup::="?" KeySpecifier
MainModule::=Prolog QueryBody
MapConstructor::="map" Lbrace (MapConstructorEntry ("," MapConstructorEntry)) Rbrace
MapConstructorEntry::=MapKeyExpr ":" MapValueExpr
MapKeyExpr::=ExprSingle
MapTest::=(AnyMapTest | TypedMapTest)
MapValueExpr::=ExprSingle
Minus::="-"
Module::=VersionDecl (LibraryModule | MainModule)
ModuleDecl::="module" "namespace" NCName "=" URILiteral Separator
ModuleImport::="import" "module" ("namespace" NCName "=") URILiteral ("at" URILiteral ("," URILiteral))
NamedFunctionRef::=_Function_QName_or_EQName "#" IntegerLiteral
NamespaceDecl::="declare" "namespace" NCName "=" URILiteral
NamespaceNodeTest::="namespace-node" "(" ")"
NameTest::=(_QName_or_EQName | Wildcard)
NCName::=QName
NCNameColonStar::=NCNameTok ":*"
NCNameTok::=Nmstart Nmchar
NextItem::=_QName_or_EQName
Nmchar::=(Letter | CombiningChar | Extender | Digit | "." | "-" | "_")
Nmstart::=(Letter | "_")
NodeComp::=("is" | "<<" | ">>")
NodeConstructor::=(DirectConstructor | ComputedConstructor)
NodeTest::=(KindTest | NameTest)
NumericLiteral::=(IntegerLiteral | DecimalLiteral | DoubleLiteral)
NumericLiteralError::=(("." Digits) | (Digits ("." [09]))) ([eE] [+-] Digits) [azAZ]
OccurrenceIndicator::=("?" | "*" | Plus)
OpenApos::="'"
OpenQuot::="""
OptionDecl::="declare" "option" _QName_or_EQName StringLiteral
OrderByClause::=(("order" "by") | ("stable" "order" "by")) OrderSpecList
OrderedExpr::="ordered" EnclosedExpr
OrderingModeDecl::="declare" "ordering" ("ordered" | "unordered")
OrderModifier::=(Ascending | Descending) ("empty" (Greatest | Least)) ("collation" URILiteral)
OrderSpec::=ExprSingle OrderModifier
OrderSpecList::=OrderSpec ("," OrderSpec)
Param::="$" _QName_or_EQName TypeDeclaration
ParamList::=Param ("," Param)
ParenthesizedExpr::="(" Expr ")"
ParenthesizedItemType::="(" ItemType ")"
PathExpr::=((Slash RelativePathExpr) | (SlashSlash RelativePathExpr) | RelativePathExpr)
PITarget::=NCNameTok
PITargetError::=("XML" | "XMl" | "XmL" | "Xml" | "xML" | "xMl" | "xmL" | "xml")
PITest::="processing-instruction" "(" (NCName | StringLiteral) ")"
Plus::="+"
PositionalVar::="at" "$" VarName
PostfixExpr::=PrimaryExpr (Predicate | ArgumentList | Lookup)
Pragma::=PragmaOpen S _QName_or_EQName (S PragmaContents) PragmaClose
PragmaClose::="#)"
PragmaContents::=Char
PragmaOpen::="(#"
PredefinedEntityRef::="&" ("lt" | "gt" | "amp" | "quot" | "apos") ";"
Predicate::="[" Expr "]"
PredicateList::=Predicate
Prefix::=NCName
PreserveMode::=("preserve" | "no-preserve")
PreviousItem::=_QName_or_EQName
PrimaryExpr::=(Literal | VarRef | ParenthesizedExpr | ContextItemExpr | FunctionCall | OrderedExpr | UnorderedExpr | NodeConstructor | FunctionItemExpr | MapConstructor | ArrayConstructor | StringConstructor | UnaryLookup)
ProcessingInstructionEnd::="?>"
ProcessingInstructionStart::="<?"
Prolog::=((DefaultNamespaceDecl | Setter | NamespaceDecl | Import) Separator) ((ContextItemDecl | AnnotatedDecl | OptionDecl) Separator)
QName::=(FunctionQName | "array" | "attribute" | "comment" | "document-node" | "element" | "empty-sequence" | "function" | "if" | "item" | "map" | "namespace-node" | "node" | "processing-instruction" | "schema-attribute" | "schema-element" | "switch" | "text" | "typeswitch")
QNameToken::=(NCNameTok ":") LocalPart
QuantifiedExpr::=("some" | "every") "$" VarName TypeDeclaration "in" ExprSingle ("," "$" VarName TypeDeclaration "in" ExprSingle) "satisfies" ExprSingle
QueryBody::=Expr
QuotAttrContentChar::=Char
QuotAttrValueContent::=(QuotAttrContentChar | CommonContent)
Rbrace::="}"
RbraceError::="}"
RCurlyBraceEscape::="}}"
RelativePathExpr::=StepExpr ((Slash | SlashSlash) StepExpr)
ReturnClause::="return" ExprSingle
ReverseAxis::=(("parent" "::") | ("ancestor" "::") | ("preceding-sibling" "::") | ("preceding" "::") | ("ancestor-or-self" "::"))
ReverseStep::=((ReverseAxis NodeTest) | AbbrevReverseStep)
S::=WhitespaceChar
SchemaAttributeTest::="schema-attribute" "(" AttributeDeclaration ")"
SchemaElementTest::="schema-element" "(" ElementDeclaration ")"
SchemaImport::="import" "schema" SchemaPrefix URILiteral ("at" URILiteral ("," URILiteral))
SchemaPrefix::=(("namespace" NCName "=") | ("default" "element" "namespace"))
Separator::=";"
SequenceType::=(("empty-sequence" "(" ")") | (ItemType OccurrenceIndicator))
SequenceTypeUnion::=SequenceType ("|" SequenceType)
Setter::=(BoundarySpaceDecl | DefaultCollationDecl | BaseURIDecl | ConstructionDecl | OrderingModeDecl | EmptyOrderDecl | CopyNamespacesDecl | DecimalFormatDecl)
SimpleMapExpr::=PathExpr ("!" PathExpr)
SimpleTypeName::=TypeName
SingleType::=SimpleTypeName "?"
Slash::="/"
SlashSlash::="//"
SlidingWindowClause::="sliding" "window" "$" VarName TypeDeclaration "in" ExprSingle WindowStartCondition WindowEndCondition
SquareArrayConstructor::="[" (ExprSingle ("," ExprSingle)) "]"
StarColonNCName::="*:" NCNameTok
StartTagClose::=">"
StepExpr::=(PostfixExpr | AxisStep)
StringConstructor::=StringConstructorStart StringConstructorContent StringConstructorEnd
StringConstructorChars::=Char
StringConstructorContent::=StringConstructorChars (StringConstructorInterpolation StringConstructorChars)
StringConstructorEnd::="]``"
StringConstructorInterpolation::=StringConstructorInterpolationStart Expr StringConstructorInterpolationEnd
StringConstructorInterpolationEnd::="}`"
StringConstructorInterpolationStart::="`{"
StringConstructorStart::="``["
StringLiteral::=((""" (PredefinedEntityRef | CharRef | EscapeQuot | ["&]) """) | ("'" (PredefinedEntityRef | CharRef | EscapeApos | ['&]) "'"))
SwitchCaseClause::=("case" SwitchCaseOperand) "return" ExprSingle
SwitchCaseOperand::=ExprSingle
SwitchExpr::="switch" "(" Expr ")" SwitchCaseClause "default" "return" ExprSingle
TagQName::=QNameToken
TextTest::="text" "(" ")"
TryCatchExpr::=TryClause CatchClause
TryClause::="try" EnclosedTryTargetExpr
TumblingWindowClause::="tumbling" "window" "$" VarName TypeDeclaration "in" ExprSingle WindowStartCondition WindowEndCondition
TypedArrayTest::="array" "(" SequenceType ")"
TypeDeclaration::="as" SequenceType
TypedFunctionTest::="function" "(" (SequenceType ("," SequenceType)) ")" "as" SequenceType
TypedMapTest::="map" "(" AtomicOrUnionType "," SequenceType ")"
TypeName::=_QName_or_EQName
TypeswitchExpr::="typeswitch" "(" Expr ")" CaseClause "default" ("$" VarName) "return" ExprSingle
UnaryLookup::="?" KeySpecifier
UnorderedExpr::="unordered" EnclosedExpr
URILiteral::=StringLiteral
URIQualifiedName::=BracedURILiteral NCNameTok
URIQualifiedStar::=BracedURILiteral "*"
ValidateExpr::="validate" (ValidationMode | ("type" TypeName)) Lbrace Expr Rbrace
ValidationMode::=("lax" | "strict")
ValueComp::=("eq" | "ne" | "lt" | "le" | "gt" | "ge")
ValueIndicator::="="
VarDecl::="variable" "$" VarName TypeDeclaration ((":=" VarValue) | (External (":=" VarDefaultValue)))
VarDefaultValue::=ExprSingle
VarName::=_QName_or_EQName
VarRef::="$" VarName
VarValue::=ExprSingle
VersionDecl::="xquery" (("encoding" StringLiteral) | ("version" StringLiteral ("encoding" StringLiteral))) Separator
WhereClause::="where" ExprSingle
WhitespaceChar::=[&#x0009; &#x000D; &#x000A; &#x0020; ]
Wildcard::=("*" | NCNameColonStar | StarColonNCName | URIQualifiedStar)
WindowClause::="for" (TumblingWindowClause | SlidingWindowClause)
WindowEndCondition::="only" "end" WindowVars "when" ExprSingle
WindowStartCondition::="start" WindowVars "when" ExprSingle
WindowVars::=("$" CurrentItem) PositionalVar ("previous" "$" PreviousItem) ("next" "$" NextItem)