XQueryParser.ebnf 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  1. <?xqlint
  2. /* ***** BEGIN LICENSE BLOCK *****
  3. * Distributed under the BSD license:
  4. *
  5. * Copyright (c) 2010, Ajax.org B.V.
  6. * All rights reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions are met:
  10. * * Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * * Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * * Neither the name of Ajax.org B.V. nor the
  16. * names of its contributors may be used to endorse or promote products
  17. * derived from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  20. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  21. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  22. * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
  23. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  24. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  25. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  26. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  28. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. *
  30. * ***** END LICENSE BLOCK ***** */
  31. define(function(require, exports, module){
  32. var XQueryParser = exports.XQueryParser = function XQueryParser(string, parsingEventHandler)
  33. {
  34. init(string, parsingEventHandler);
  35. ?>
  36. XQuery ::= Module EOF
  37. Module ::= VersionDecl? ( LibraryModule | MainModule )
  38. VersionDecl
  39. ::= 'xquery' ( 'encoding' StringLiteral | 'version' StringLiteral ( 'encoding' StringLiteral )? ) Separator
  40. LibraryModule
  41. ::= ModuleDecl Prolog
  42. ModuleDecl
  43. ::= 'module' 'namespace' NCName '=' URILiteral Separator
  44. Prolog ::= ( ( DefaultNamespaceDecl | Setter | NamespaceDecl | Import | FTOptionDecl ) Separator )* ( ( ContextItemDecl | AnnotatedDecl | OptionDecl ) Separator )*
  45. Separator
  46. ::= ';'
  47. Setter ::= BoundarySpaceDecl
  48. | DefaultCollationDecl
  49. | BaseURIDecl
  50. | ConstructionDecl
  51. | OrderingModeDecl
  52. | EmptyOrderDecl
  53. | RevalidationDecl
  54. | CopyNamespacesDecl
  55. | DecimalFormatDecl
  56. BoundarySpaceDecl
  57. ::= 'declare' 'boundary-space' ( 'preserve' | 'strip' )
  58. DefaultCollationDecl
  59. ::= 'declare' 'default' 'collation' URILiteral
  60. BaseURIDecl
  61. ::= 'declare' 'base-uri' URILiteral
  62. ConstructionDecl
  63. ::= 'declare' 'construction' ( 'strip' | 'preserve' )
  64. OrderingModeDecl
  65. ::= 'declare' 'ordering' ( 'ordered' | 'unordered' )
  66. EmptyOrderDecl
  67. ::= 'declare' 'default' 'order' 'empty' ( 'greatest' | 'least' )
  68. CopyNamespacesDecl
  69. ::= 'declare' 'copy-namespaces' PreserveMode ',' InheritMode
  70. PreserveMode
  71. ::= 'preserve'
  72. | 'no-preserve'
  73. InheritMode
  74. ::= 'inherit'
  75. | 'no-inherit'
  76. DecimalFormatDecl
  77. ::= 'declare' ( 'decimal-format' EQName | 'default' 'decimal-format' ) ( DFPropertyName '=' StringLiteral )*
  78. DFPropertyName
  79. ::= 'decimal-separator'
  80. | 'grouping-separator'
  81. | 'infinity'
  82. | 'minus-sign'
  83. | 'NaN'
  84. | 'percent'
  85. | 'per-mille'
  86. | 'zero-digit'
  87. | 'digit'
  88. | 'pattern-separator'
  89. Import ::= SchemaImport
  90. | ModuleImport
  91. SchemaImport
  92. ::= 'import' 'schema' SchemaPrefix? URILiteral ( 'at' URILiteral ( ',' URILiteral )* )?
  93. SchemaPrefix
  94. ::= 'namespace' NCName '='
  95. | 'default' 'element' 'namespace'
  96. ModuleImport
  97. ::= 'import' 'module' ( 'namespace' NCName '=' )? URILiteral ( 'at' URILiteral ( ',' URILiteral )* )?
  98. NamespaceDecl
  99. ::= 'declare' 'namespace' NCName '=' URILiteral
  100. DefaultNamespaceDecl
  101. ::= 'declare' 'default' ( 'element' | 'function' ) 'namespace' URILiteral
  102. FTOptionDecl
  103. ::= 'declare' 'ft-option' FTMatchOptions
  104. AnnotatedDecl
  105. ::= 'declare' ( CompatibilityAnnotation | Annotation )* ( VarDecl | FunctionDecl | CollectionDecl | IndexDecl | ICDecl )
  106. CompatibilityAnnotation
  107. ::= 'updating'
  108. Annotation
  109. ::= '%' EQName ( '(' Literal ( ',' Literal )* ')' )?
  110. VarDecl ::= 'variable' '$' VarName TypeDeclaration? ( ':=' VarValue | 'external' ( ':=' VarDefaultValue )? )
  111. VarValue ::= ExprSingle
  112. VarDefaultValue
  113. ::= ExprSingle
  114. ContextItemDecl
  115. ::= 'declare' 'context' 'item' ( 'as' ItemType )? ( ':=' VarValue | 'external' ( ':=' VarDefaultValue )? )
  116. ParamList
  117. ::= Param ( ',' Param )*
  118. Param ::= '$' EQName TypeDeclaration?
  119. FunctionBody
  120. ::= EnclosedExpr
  121. EnclosedExpr
  122. ::= '{' Expr '}'
  123. OptionDecl
  124. ::= 'declare' 'option' EQName StringLiteral
  125. Expr ::= ExprSingle ( ',' ExprSingle )*
  126. FLWORExpr
  127. ::= InitialClause IntermediateClause* ReturnClause
  128. InitialClause
  129. ::= ForClause
  130. | LetClause
  131. | WindowClause
  132. IntermediateClause
  133. ::= InitialClause
  134. | WhereClause
  135. | GroupByClause
  136. | OrderByClause
  137. | CountClause
  138. ForClause
  139. ::= 'for' ForBinding ( ',' ForBinding )*
  140. ForBinding
  141. ::= '$' VarName TypeDeclaration? AllowingEmpty? PositionalVar? FTScoreVar? 'in' ExprSingle
  142. AllowingEmpty
  143. ::= 'allowing' 'empty'
  144. PositionalVar
  145. ::= 'at' '$' VarName
  146. FTScoreVar
  147. ::= 'score' '$' VarName
  148. LetClause
  149. ::= 'let' LetBinding ( ',' LetBinding )*
  150. LetBinding
  151. ::= ( '$' VarName TypeDeclaration? | FTScoreVar ) ':=' ExprSingle
  152. WindowClause
  153. ::= 'for' ( TumblingWindowClause | SlidingWindowClause )
  154. TumblingWindowClause
  155. ::= 'tumbling' 'window' '$' VarName TypeDeclaration? 'in' ExprSingle WindowStartCondition WindowEndCondition?
  156. SlidingWindowClause
  157. ::= 'sliding' 'window' '$' VarName TypeDeclaration? 'in' ExprSingle WindowStartCondition WindowEndCondition
  158. WindowStartCondition
  159. ::= 'start' WindowVars 'when' ExprSingle
  160. WindowEndCondition
  161. ::= 'only'? 'end' WindowVars 'when' ExprSingle
  162. WindowVars
  163. ::= ( '$' CurrentItem )? PositionalVar? ( 'previous' '$' PreviousItem )? ( 'next' '$' NextItem )?
  164. CurrentItem
  165. ::= EQName
  166. PreviousItem
  167. ::= EQName
  168. NextItem ::= EQName
  169. CountClause
  170. ::= 'count' '$' VarName
  171. WhereClause
  172. ::= 'where' ExprSingle
  173. GroupByClause
  174. ::= 'group' 'by' GroupingSpecList
  175. GroupingSpecList
  176. ::= GroupingSpec ( ',' GroupingSpec )*
  177. GroupingSpec
  178. ::= GroupingVariable ( TypeDeclaration? ':=' ExprSingle )? ( 'collation' URILiteral )?
  179. GroupingVariable
  180. ::= '$' VarName
  181. OrderByClause
  182. ::= ( 'order' 'by' | 'stable' 'order' 'by' ) OrderSpecList
  183. OrderSpecList
  184. ::= OrderSpec ( ',' OrderSpec )*
  185. OrderSpec
  186. ::= ExprSingle OrderModifier
  187. OrderModifier
  188. ::= ( 'ascending' | 'descending' )? ( 'empty' ( 'greatest' | 'least' ) )? ( 'collation' URILiteral )?
  189. ReturnClause
  190. ::= 'return' ExprSingle
  191. QuantifiedExpr
  192. ::= ( 'some' | 'every' ) '$' VarName TypeDeclaration? 'in' ExprSingle ( ',' '$' VarName TypeDeclaration? 'in' ExprSingle )* 'satisfies' ExprSingle
  193. SwitchExpr
  194. ::= 'switch' '(' Expr ')' SwitchCaseClause+ 'default' 'return' ExprSingle
  195. SwitchCaseClause
  196. ::= ( 'case' SwitchCaseOperand )+ 'return' ExprSingle
  197. SwitchCaseOperand
  198. ::= ExprSingle
  199. TypeswitchExpr
  200. ::= 'typeswitch' '(' Expr ')' CaseClause+ 'default' ( '$' VarName )? 'return' ExprSingle
  201. CaseClause
  202. ::= 'case' ( '$' VarName 'as' )? SequenceTypeUnion 'return' ExprSingle
  203. SequenceTypeUnion
  204. ::= SequenceType ( '|' SequenceType )*
  205. IfExpr ::= 'if' '(' Expr ')' 'then' ExprSingle 'else' ExprSingle
  206. TryCatchExpr
  207. ::= TryClause CatchClause+
  208. TryClause
  209. ::= 'try' '{' TryTargetExpr '}'
  210. TryTargetExpr
  211. ::= Expr
  212. CatchClause
  213. ::= 'catch' CatchErrorList '{' Expr '}'
  214. CatchErrorList
  215. ::= NameTest ( '|' NameTest )*
  216. OrExpr ::= AndExpr ( 'or' AndExpr )*
  217. AndExpr ::= ComparisonExpr ( 'and' ComparisonExpr )*
  218. ComparisonExpr
  219. ::= FTContainsExpr ( ( ValueComp | GeneralComp | NodeComp ) FTContainsExpr )?
  220. FTContainsExpr
  221. ::= StringConcatExpr ( 'contains' 'text' FTSelection FTIgnoreOption? )?
  222. StringConcatExpr
  223. ::= RangeExpr ( '||' RangeExpr )*
  224. RangeExpr
  225. ::= AdditiveExpr ( 'to' AdditiveExpr )?
  226. AdditiveExpr
  227. ::= MultiplicativeExpr ( ( '+' | '-' ) MultiplicativeExpr )*
  228. MultiplicativeExpr
  229. ::= UnionExpr ( ( '*' | 'div' | 'idiv' | 'mod' ) UnionExpr )*
  230. UnionExpr
  231. ::= IntersectExceptExpr ( ( 'union' | '|' ) IntersectExceptExpr )*
  232. IntersectExceptExpr
  233. ::= InstanceofExpr ( ( 'intersect' | 'except' ) InstanceofExpr )*
  234. InstanceofExpr
  235. ::= TreatExpr ( 'instance' 'of' SequenceType )?
  236. TreatExpr
  237. ::= CastableExpr ( 'treat' 'as' SequenceType )?
  238. CastableExpr
  239. ::= CastExpr ( 'castable' 'as' SingleType )?
  240. CastExpr ::= UnaryExpr ( 'cast' 'as' SingleType )?
  241. UnaryExpr
  242. ::= ( '-' | '+' )* ValueExpr
  243. ValueExpr
  244. ::= ValidateExpr
  245. | SimpleMapExpr
  246. | ExtensionExpr
  247. SimpleMapExpr
  248. ::= PathExpr ('!' PathExpr)*
  249. GeneralComp
  250. ::= '='
  251. | '!='
  252. | '<'
  253. | '<='
  254. | '>'
  255. | '>='
  256. ValueComp
  257. ::= 'eq'
  258. | 'ne'
  259. | 'lt'
  260. | 'le'
  261. | 'gt'
  262. | 'ge'
  263. NodeComp ::= 'is'
  264. | '<<'
  265. | '>>'
  266. ValidateExpr
  267. ::= 'validate' ( ValidationMode | 'type' TypeName )? '{' Expr '}'
  268. ValidationMode
  269. ::= 'lax'
  270. | 'strict'
  271. ExtensionExpr
  272. ::= Pragma+ '{' Expr? '}'
  273. Pragma ::= '(#' S? EQName ( S PragmaContents )? '#)'
  274. /* ws: explicit */
  275. PathExpr ::= '/' ( RelativePathExpr / )
  276. | '//' RelativePathExpr
  277. | RelativePathExpr
  278. RelativePathExpr
  279. ::= StepExpr ( ( '/' | '//' | '!' ) StepExpr )*
  280. StepExpr ::= PostfixExpr
  281. | AxisStep
  282. AxisStep ::= ( ReverseStep | ForwardStep ) PredicateList
  283. ForwardStep
  284. ::= ForwardAxis NodeTest
  285. | AbbrevForwardStep
  286. ForwardAxis
  287. ::= 'child' '::'
  288. | 'descendant' '::'
  289. | 'attribute' '::'
  290. | 'self' '::'
  291. | 'descendant-or-self' '::'
  292. | 'following-sibling' '::'
  293. | 'following' '::'
  294. AbbrevForwardStep
  295. ::= '@'? NodeTest
  296. ReverseStep
  297. ::= ReverseAxis NodeTest
  298. | AbbrevReverseStep
  299. ReverseAxis
  300. ::= 'parent' '::'
  301. | 'ancestor' '::'
  302. | 'preceding-sibling' '::'
  303. | 'preceding' '::'
  304. | 'ancestor-or-self' '::'
  305. AbbrevReverseStep
  306. ::= '..'
  307. NodeTest ::= KindTest
  308. | NameTest
  309. NameTest ::= EQName
  310. | Wildcard
  311. PostfixExpr
  312. ::= PrimaryExpr ( Predicate | ArgumentList )*
  313. ArgumentList
  314. ::= '(' ( Argument ( ',' Argument )* )? ')'
  315. PredicateList
  316. ::= Predicate*
  317. Predicate
  318. ::= '[' Expr ']'
  319. Literal ::= NumericLiteral
  320. | StringLiteral
  321. NumericLiteral
  322. ::= IntegerLiteral
  323. | DecimalLiteral
  324. | DoubleLiteral
  325. VarRef ::= '$' VarName
  326. VarName ::= EQName
  327. ParenthesizedExpr
  328. ::= '(' Expr? ')'
  329. ContextItemExpr
  330. ::= '.'
  331. OrderedExpr
  332. ::= 'ordered' '{' Expr '}'
  333. UnorderedExpr
  334. ::= 'unordered' '{' Expr '}'
  335. FunctionCall
  336. ::= FunctionName ArgumentList
  337. Argument ::= ExprSingle
  338. | ArgumentPlaceholder
  339. ArgumentPlaceholder
  340. ::= '?'
  341. Constructor
  342. ::= DirectConstructor
  343. | ComputedConstructor
  344. DirectConstructor
  345. ::= DirElemConstructor
  346. | DirCommentConstructor
  347. | DirPIConstructor
  348. DirElemConstructor
  349. ::= '<' QName DirAttributeList ( '/>' | '>' DirElemContent* '</' QName S? '>' )
  350. /* ws: explicit */
  351. DirAttributeList
  352. ::= ( S ( QName S? '=' S? DirAttributeValue )? )*
  353. /* ws: explicit */
  354. DirAttributeValue
  355. ::= '"' ( EscapeQuot | QuotAttrValueContent )* '"'
  356. | "'" ( EscapeApos | AposAttrValueContent )* "'"
  357. /* ws: explicit */
  358. QuotAttrValueContent
  359. ::= QuotAttrContentChar
  360. | CommonContent
  361. AposAttrValueContent
  362. ::= AposAttrContentChar
  363. | CommonContent
  364. DirElemContent
  365. ::= DirectConstructor
  366. | CDataSection
  367. | CommonContent
  368. | ElementContentChar
  369. DirCommentConstructor
  370. ::= '<!--' DirCommentContents '-->'
  371. /* ws: explicit */
  372. DirPIConstructor
  373. ::= '<?' PITarget ( S DirPIContents )? '?>'
  374. /* ws: explicit */
  375. ComputedConstructor
  376. ::= CompDocConstructor
  377. | CompElemConstructor
  378. | CompAttrConstructor
  379. | CompNamespaceConstructor
  380. | CompTextConstructor
  381. | CompCommentConstructor
  382. | CompPIConstructor
  383. CompElemConstructor
  384. ::= 'element' ( EQName | '{' Expr '}' ) '{' ContentExpr? '}'
  385. CompNamespaceConstructor
  386. ::= 'namespace' ( Prefix | '{' PrefixExpr '}' ) '{' URIExpr '}'
  387. Prefix ::= NCName
  388. PrefixExpr
  389. ::= Expr
  390. URIExpr ::= Expr
  391. FunctionItemExpr
  392. ::= NamedFunctionRef
  393. | InlineFunctionExpr
  394. NamedFunctionRef
  395. ::= EQName '#' IntegerLiteral
  396. InlineFunctionExpr
  397. ::= Annotation* 'function' '(' ParamList? ')' ( 'as' SequenceType )? FunctionBody
  398. SingleType
  399. ::= SimpleTypeName '?'?
  400. TypeDeclaration
  401. ::= 'as' SequenceType
  402. SequenceType
  403. ::= 'empty-sequence' '(' ')'
  404. | ItemType ( OccurrenceIndicator / )
  405. OccurrenceIndicator
  406. ::= '?'
  407. | '*'^OccurrenceIndicator
  408. | '+'
  409. ItemType ::= KindTest
  410. | 'item' '(' ')'
  411. | FunctionTest
  412. | AtomicOrUnionType
  413. | ParenthesizedItemType
  414. | JSONTest
  415. | StructuredItemTest
  416. JSONTest ::=
  417. JSONItemTest
  418. | JSONObjectTest
  419. | JSONArrayTest
  420. StructuredItemTest ::= "structured-item" "(" ")"
  421. JSONItemTest ::= "json-item" "(" ")"
  422. JSONObjectTest ::= "object" "(" ")"
  423. JSONArrayTest ::= "array" "(" ")"
  424. AtomicOrUnionType
  425. ::= EQName
  426. KindTest ::= DocumentTest
  427. | ElementTest
  428. | AttributeTest
  429. | SchemaElementTest
  430. | SchemaAttributeTest
  431. | PITest
  432. | CommentTest
  433. | TextTest
  434. | NamespaceNodeTest
  435. | JSONTest
  436. | AnyKindTest
  437. AnyKindTest
  438. ::= 'node' '(' ')'
  439. DocumentTest
  440. ::= 'document-node' '(' ( ElementTest | SchemaElementTest )? ')'
  441. TextTest ::= 'text' '(' ')'
  442. CommentTest
  443. ::= 'comment' '(' ')'
  444. NamespaceNodeTest
  445. ::= 'namespace-node' '(' ')'
  446. PITest ::= 'processing-instruction' '(' ( NCName | StringLiteral )? ')'
  447. AttributeTest
  448. ::= 'attribute' '(' ( AttribNameOrWildcard ( ',' TypeName )? )? ')'
  449. AttribNameOrWildcard
  450. ::= AttributeName
  451. | '*'
  452. SchemaAttributeTest
  453. ::= 'schema-attribute' '(' AttributeDeclaration ')'
  454. AttributeDeclaration
  455. ::= AttributeName
  456. ElementTest
  457. ::= 'element' '(' ( ElementNameOrWildcard ( ',' TypeName '?'? )? )? ')'
  458. ElementNameOrWildcard
  459. ::= ElementName
  460. | '*'
  461. SchemaElementTest
  462. ::= 'schema-element' '(' ElementDeclaration ')'
  463. ElementDeclaration
  464. ::= ElementName
  465. AttributeName
  466. ::= EQName
  467. ElementName
  468. ::= EQName
  469. SimpleTypeName
  470. ::= TypeName
  471. TypeName ::= EQName
  472. FunctionTest
  473. ::= Annotation* ( AnyFunctionTest | TypedFunctionTest )
  474. AnyFunctionTest
  475. ::= 'function' '(' '*' ')'
  476. TypedFunctionTest
  477. ::= 'function' '(' ( SequenceType ( ',' SequenceType )* )? ')' 'as' SequenceType
  478. ParenthesizedItemType
  479. ::= '(' ItemType ')'
  480. RevalidationDecl
  481. ::= 'declare' 'revalidation' ( 'strict' | 'lax' | 'skip' )
  482. InsertExprTargetChoice
  483. ::= ( 'as' ( 'first' | 'last' ) )? 'into'
  484. | 'after'
  485. | 'before'
  486. InsertExpr
  487. ::= 'insert' ( 'node' | 'nodes' ) SourceExpr InsertExprTargetChoice TargetExpr
  488. DeleteExpr
  489. ::= 'delete' ( 'node' | 'nodes' ) TargetExpr
  490. ReplaceExpr
  491. ::= 'replace' ( 'value' 'of' )? 'node' TargetExpr 'with' ExprSingle
  492. RenameExpr
  493. ::= 'rename' 'node' TargetExpr 'as' NewNameExpr
  494. SourceExpr
  495. ::= ExprSingle
  496. TargetExpr
  497. ::= ExprSingle
  498. NewNameExpr
  499. ::= ExprSingle
  500. TransformExpr
  501. ::= 'copy' '$' VarName ':=' ExprSingle ( ',' '$' VarName ':=' ExprSingle )* 'modify' ExprSingle 'return' ExprSingle
  502. FTSelection
  503. ::= FTOr FTPosFilter*
  504. FTWeight ::= 'weight' '{' Expr '}'
  505. FTOr ::= FTAnd ( 'ftor' FTAnd )*
  506. FTAnd ::= FTMildNot ( 'ftand' FTMildNot )*
  507. FTMildNot
  508. ::= FTUnaryNot ( 'not' 'in' FTUnaryNot )*
  509. FTUnaryNot
  510. ::= 'ftnot'? FTPrimaryWithOptions
  511. FTPrimaryWithOptions
  512. ::= FTPrimary FTMatchOptions? FTWeight?
  513. FTPrimary
  514. ::= FTWords FTTimes?
  515. | '(' FTSelection ')'
  516. | FTExtensionSelection
  517. FTWords ::= FTWordsValue FTAnyallOption?
  518. FTWordsValue
  519. ::= StringLiteral
  520. | '{' Expr '}'
  521. FTExtensionSelection
  522. ::= Pragma+ '{' FTSelection? '}'
  523. FTAnyallOption
  524. ::= 'any' 'word'?
  525. | 'all' 'words'?
  526. | 'phrase'
  527. FTTimes ::= 'occurs' FTRange 'times'
  528. FTRange ::= 'exactly' AdditiveExpr
  529. | 'at' ( 'least' AdditiveExpr | 'most' AdditiveExpr )
  530. | 'from' AdditiveExpr 'to' AdditiveExpr
  531. FTPosFilter
  532. ::= FTOrder
  533. | FTWindow
  534. | FTDistance
  535. | FTScope
  536. | FTContent
  537. FTOrder ::= 'ordered'
  538. FTWindow ::= 'window' AdditiveExpr FTUnit
  539. FTDistance
  540. ::= 'distance' FTRange FTUnit
  541. FTUnit ::= 'words'
  542. | 'sentences'
  543. | 'paragraphs'
  544. FTScope ::= ( 'same' | 'different' ) FTBigUnit
  545. FTBigUnit
  546. ::= 'sentence'
  547. | 'paragraph'
  548. FTContent
  549. ::= 'at' ( 'start' | 'end' )
  550. | 'entire' 'content'
  551. FTMatchOptions
  552. ::= ( 'using' FTMatchOption )+
  553. FTMatchOption
  554. ::= FTLanguageOption
  555. | FTWildCardOption
  556. | FTThesaurusOption
  557. | FTStemOption
  558. | FTCaseOption
  559. | FTDiacriticsOption
  560. | FTStopWordOption
  561. | FTExtensionOption
  562. FTCaseOption
  563. ::= 'case' ( 'insensitive' | 'sensitive' )
  564. | 'lowercase'
  565. | 'uppercase'
  566. FTDiacriticsOption
  567. ::= 'diacritics' ( 'insensitive' | 'sensitive' )
  568. FTStemOption
  569. ::= 'stemming'
  570. | 'no' 'stemming'
  571. FTThesaurusOption
  572. ::= 'thesaurus' ( FTThesaurusID | 'default' | '(' ( FTThesaurusID | 'default' ) ( ',' FTThesaurusID )* ')' )
  573. | 'no' 'thesaurus'
  574. FTThesaurusID
  575. ::= 'at' URILiteral ( 'relationship' StringLiteral )? ( FTLiteralRange 'levels' )?
  576. FTLiteralRange
  577. ::= 'exactly' IntegerLiteral
  578. | 'at' ( 'least' IntegerLiteral | 'most' IntegerLiteral )
  579. | 'from' IntegerLiteral 'to' IntegerLiteral
  580. FTStopWordOption
  581. ::= 'stop' 'words' ( FTStopWords FTStopWordsInclExcl* | 'default' FTStopWordsInclExcl* )
  582. | 'no' 'stop' 'words'
  583. FTStopWords
  584. ::= 'at' URILiteral
  585. | '(' StringLiteral ( ',' StringLiteral )* ')'
  586. FTStopWordsInclExcl
  587. ::= ( 'union' | 'except' ) FTStopWords
  588. FTLanguageOption
  589. ::= 'language' StringLiteral
  590. FTWildCardOption
  591. ::= 'wildcards'
  592. | 'no' 'wildcards'
  593. FTExtensionOption
  594. ::= 'option' EQName StringLiteral
  595. FTIgnoreOption
  596. ::= 'without' 'content' UnionExpr
  597. CollectionDecl
  598. ::= 'collection' EQName CollectionTypeDecl?
  599. CollectionTypeDecl
  600. ::= 'as' KindTest OccurrenceIndicator?
  601. IndexName
  602. ::= EQName
  603. IndexDomainExpr
  604. ::= PathExpr
  605. IndexKeySpec
  606. ::= IndexKeyExpr IndexKeyTypeDecl? IndexKeyCollation?
  607. IndexKeyExpr
  608. ::= PathExpr
  609. IndexKeyTypeDecl
  610. ::= 'as' AtomicType OccurrenceIndicator?
  611. AtomicType
  612. ::= EQName
  613. IndexKeyCollation
  614. ::= 'collation' URILiteral
  615. IndexDecl
  616. ::= 'index' IndexName 'on' 'nodes' IndexDomainExpr 'by' IndexKeySpec ( ',' IndexKeySpec )*
  617. ICDecl ::= 'integrity' 'constraint' EQName ( ICCollection | ICForeignKey )
  618. ICCollection
  619. ::= 'on' 'collection' EQName ( ICCollSequence | ICCollSequenceUnique | ICCollNode )
  620. ICCollSequence
  621. ::= VarRef 'check' ExprSingle
  622. ICCollSequenceUnique
  623. ::= 'node' VarRef 'check' 'unique' 'key' PathExpr
  624. ICCollNode
  625. ::= 'foreach' 'node' VarRef 'check' ExprSingle
  626. ICForeignKey
  627. ::= 'foreign' 'key' ICForeignKeySource ICForeignKeyTarget
  628. ICForeignKeySource
  629. ::= 'from' ICForeignKeyValues
  630. ICForeignKeyTarget
  631. ::= 'to' ICForeignKeyValues
  632. ICForeignKeyValues
  633. ::= 'collection' EQName 'node' VarRef 'key' PathExpr
  634. Comment ::= '(:' ( CommentContents | Comment )* ':)'
  635. /* ws: explicit */
  636. Whitespace
  637. ::= S^WS
  638. | Comment
  639. /* ws: definition */
  640. EQName ::= FunctionName
  641. | 'attribute'
  642. | 'comment'
  643. | 'document-node'
  644. | 'element'
  645. | 'empty-sequence'
  646. | 'function'
  647. | 'if'
  648. | 'item'
  649. | 'namespace-node'
  650. | 'node'
  651. | 'processing-instruction'
  652. | 'schema-attribute'
  653. | 'schema-element'
  654. | 'switch'
  655. | 'text'
  656. | 'typeswitch'
  657. FunctionName
  658. ::= EQName^Token
  659. | 'after'
  660. | 'ancestor'
  661. | 'ancestor-or-self'
  662. | 'and'
  663. | 'as'
  664. | 'ascending'
  665. | 'before'
  666. | 'case'
  667. | 'cast'
  668. | 'castable'
  669. | 'child'
  670. | 'collation'
  671. | 'copy'
  672. | 'count'
  673. | 'declare'
  674. | 'default'
  675. | 'delete'
  676. | 'descendant'
  677. | 'descendant-or-self'
  678. | 'descending'
  679. | 'div'
  680. | 'document'
  681. | 'else'
  682. | 'empty'
  683. | 'end'
  684. | 'eq'
  685. | 'every'
  686. | 'except'
  687. | 'first'
  688. | 'following'
  689. | 'following-sibling'
  690. | 'for'
  691. | 'ge'
  692. | 'group'
  693. | 'gt'
  694. | 'idiv'
  695. | 'import'
  696. | 'insert'
  697. | 'instance'
  698. | 'intersect'
  699. | 'into'
  700. | 'is'
  701. | 'last'
  702. | 'le'
  703. | 'let'
  704. | 'lt'
  705. | 'mod'
  706. | 'modify'
  707. | 'module'
  708. | 'namespace'
  709. | 'ne'
  710. | 'only'
  711. | 'or'
  712. | 'order'
  713. | 'ordered'
  714. | 'parent'
  715. | 'preceding'
  716. | 'preceding-sibling'
  717. | 'rename'
  718. | 'replace'
  719. | 'return'
  720. | 'satisfies'
  721. | 'self'
  722. | 'some'
  723. | 'stable'
  724. | 'start'
  725. | 'to'
  726. | 'treat'
  727. | 'try'
  728. | 'union'
  729. | 'unordered'
  730. | 'validate'
  731. | 'where'
  732. | 'with'
  733. | 'xquery'
  734. | 'allowing'
  735. | 'at'
  736. | 'base-uri'
  737. | 'boundary-space'
  738. | 'break'
  739. | 'catch'
  740. | 'construction'
  741. | 'context'
  742. | 'continue'
  743. | 'copy-namespaces'
  744. | 'decimal-format'
  745. | 'encoding'
  746. | 'exit'
  747. | 'external'
  748. | 'ft-option'
  749. | 'in'
  750. | 'index'
  751. | 'integrity'
  752. | 'lax'
  753. | 'nodes'
  754. | 'option'
  755. | 'ordering'
  756. | 'revalidation'
  757. | 'schema'
  758. | 'score'
  759. | 'sliding'
  760. | 'strict'
  761. | 'tumbling'
  762. | 'type'
  763. | 'updating'
  764. | 'value'
  765. | 'variable'
  766. | 'version'
  767. | 'while'
  768. | 'constraint'
  769. | 'loop'
  770. | 'returning'
  771. | 'object'
  772. | 'json-item'
  773. | 'array'
  774. NCName ::= NCName^Token
  775. | 'after'
  776. | 'and'
  777. | 'as'
  778. | 'ascending'
  779. | 'before'
  780. | 'case'
  781. | 'cast'
  782. | 'castable'
  783. | 'collation'
  784. | 'count'
  785. | 'default'
  786. | 'descending'
  787. | 'div'
  788. | 'else'
  789. | 'empty'
  790. | 'end'
  791. | 'eq'
  792. | 'except'
  793. | 'for'
  794. | 'ge'
  795. | 'group'
  796. | 'gt'
  797. | 'idiv'
  798. | 'instance'
  799. | 'intersect'
  800. | 'into'
  801. | 'is'
  802. | 'le'
  803. | 'let'
  804. | 'lt'
  805. | 'mod'
  806. | 'modify'
  807. | 'ne'
  808. | 'only'
  809. | 'or'
  810. | 'order'
  811. | 'return'
  812. | 'satisfies'
  813. | 'stable'
  814. | 'start'
  815. | 'to'
  816. | 'treat'
  817. | 'union'
  818. | 'where'
  819. | 'with'
  820. | 'ancestor'
  821. | 'ancestor-or-self'
  822. | 'attribute'
  823. | 'child'
  824. | 'comment'
  825. | 'copy'
  826. | 'declare'
  827. | 'delete'
  828. | 'descendant'
  829. | 'descendant-or-self'
  830. | 'document'
  831. | 'document-node'
  832. | 'element'
  833. | 'empty-sequence'
  834. | 'every'
  835. | 'first'
  836. | 'following'
  837. | 'following-sibling'
  838. | 'function'
  839. | 'if'
  840. | 'import'
  841. | 'insert'
  842. | 'item'
  843. | 'last'
  844. | 'module'
  845. | 'namespace'
  846. | 'namespace-node'
  847. | 'node'
  848. | 'ordered'
  849. | 'parent'
  850. | 'preceding'
  851. | 'preceding-sibling'
  852. | 'processing-instruction'
  853. | 'rename'
  854. | 'replace'
  855. | 'schema-attribute'
  856. | 'schema-element'
  857. | 'self'
  858. | 'some'
  859. | 'switch'
  860. | 'text'
  861. | 'try'
  862. | 'typeswitch'
  863. | 'unordered'
  864. | 'validate'
  865. | 'variable'
  866. | 'xquery'
  867. | 'allowing'
  868. | 'at'
  869. | 'base-uri'
  870. | 'boundary-space'
  871. | 'break'
  872. | 'catch'
  873. | 'construction'
  874. | 'context'
  875. | 'continue'
  876. | 'copy-namespaces'
  877. | 'decimal-format'
  878. | 'encoding'
  879. | 'exit'
  880. | 'external'
  881. | 'ft-option'
  882. | 'in'
  883. | 'index'
  884. | 'integrity'
  885. | 'lax'
  886. | 'nodes'
  887. | 'option'
  888. | 'ordering'
  889. | 'revalidation'
  890. | 'schema'
  891. | 'score'
  892. | 'sliding'
  893. | 'strict'
  894. | 'tumbling'
  895. | 'type'
  896. | 'updating'
  897. | 'value'
  898. | 'version'
  899. | 'while'
  900. | 'constraint'
  901. | 'loop'
  902. | 'returning'
  903. MainModule
  904. ::= Prolog Program
  905. Program ::= StatementsAndOptionalExpr
  906. Statements
  907. ::= Statement*
  908. StatementsAndExpr
  909. ::= Statements Expr
  910. StatementsAndOptionalExpr
  911. ::= Statements Expr?
  912. Statement
  913. ::= ApplyStatement
  914. | AssignStatement
  915. | BlockStatement
  916. | BreakStatement
  917. | ContinueStatement
  918. | ExitStatement
  919. | FLWORStatement
  920. | IfStatement
  921. | SwitchStatement
  922. | TryCatchStatement
  923. | TypeswitchStatement
  924. | VarDeclStatement
  925. | WhileStatement
  926. ApplyStatement
  927. ::= ExprSimple ';'
  928. AssignStatement
  929. ::= '$' VarName ':=' ExprSingle ';'
  930. BlockStatement
  931. ::= '{' Statements '}'
  932. BreakStatement
  933. ::= 'break' 'loop' ';'
  934. ContinueStatement
  935. ::= 'continue' 'loop' ';'
  936. ExitStatement
  937. ::= 'exit' 'returning' ExprSingle ';'
  938. FLWORStatement
  939. ::= InitialClause IntermediateClause* ReturnStatement
  940. ReturnStatement
  941. ::= 'return' Statement
  942. IfStatement
  943. ::= 'if' '(' Expr ')' 'then' Statement 'else' Statement
  944. SwitchStatement
  945. ::= 'switch' '(' Expr ')' SwitchCaseStatement+ 'default' 'return' Statement
  946. SwitchCaseStatement
  947. ::= ( 'case' SwitchCaseOperand )+ 'return' Statement
  948. TryCatchStatement
  949. ::= 'try' BlockStatement ( 'catch' CatchErrorList BlockStatement )+
  950. TypeswitchStatement
  951. ::= 'typeswitch' '(' Expr ')' CaseStatement+ 'default' ( '$' VarName )? 'return' Statement
  952. CaseStatement
  953. ::= 'case' ( '$' VarName 'as' )? SequenceType 'return' Statement
  954. VarDeclStatement
  955. ::= Annotation* 'variable' '$' VarName TypeDeclaration? ( ':=' ExprSingle )? ( ',' '$' VarName TypeDeclaration? ( ':=' ExprSingle )? )* ';'
  956. WhileStatement
  957. ::= 'while' '(' Expr ')' Statement
  958. ExprSingle
  959. ::= ExprSimple
  960. | FLWORExpr
  961. | IfExpr
  962. | SwitchExpr
  963. | TryCatchExpr
  964. | TypeswitchExpr
  965. ExprSimple
  966. ::= QuantifiedExpr
  967. | OrExpr
  968. | InsertExpr
  969. | DeleteExpr
  970. | RenameExpr
  971. | ReplaceExpr
  972. | TransformExpr
  973. | JSONDeleteExpr
  974. | JSONInsertExpr
  975. | JSONRenameExpr
  976. | JSONReplaceExpr
  977. | JSONAppendExpr
  978. JSONDeleteExpr ::= "delete" "json" PostfixExpr
  979. JSONInsertExpr ::= "insert" "json" ExprSingle "into" ExprSingle ("at" "position" ExprSingle)?
  980. JSONRenameExpr ::= "rename" "json" PostfixExpr "as" ExprSingle
  981. JSONReplaceExpr ::= "replace" "json" "value" "of" PostfixExpr "with" ExprSingle
  982. JSONAppendExpr ::= "append" "json" ExprSingle "into" ExprSingle
  983. CommonContent
  984. ::= PredefinedEntityRef
  985. | CharRef
  986. | '{{'
  987. | '}}'
  988. | BlockExpr
  989. ContentExpr
  990. ::= StatementsAndExpr
  991. CompDocConstructor
  992. ::= 'document' BlockExpr
  993. CompAttrConstructor
  994. ::= 'attribute' ( EQName | '{' Expr '}' ) ( '{' '}' | BlockExpr )
  995. CompPIConstructor
  996. ::= 'processing-instruction' ( NCName | '{' Expr '}' ) ( '{' '}' | BlockExpr )
  997. CompCommentConstructor
  998. ::= 'comment' BlockExpr
  999. CompTextConstructor
  1000. ::= 'text' BlockExpr
  1001. PrimaryExpr
  1002. ::= Literal
  1003. | VarRef
  1004. | ParenthesizedExpr
  1005. | ContextItemExpr
  1006. | FunctionCall
  1007. | OrderedExpr
  1008. | UnorderedExpr
  1009. | Constructor
  1010. | FunctionItemExpr
  1011. | BlockExpr
  1012. | ObjectConstructor
  1013. | ArrayConstructor
  1014. | JSONSimpleObjectUnion
  1015. JSONSimpleObjectUnion
  1016. ::= '{|' Expr? '|}'
  1017. ObjectConstructor ::= "{" ( PairConstructor ("," PairConstructor)* )? "}"
  1018. PairConstructor ::= ExprSingle ":" ExprSingle
  1019. ArrayConstructor ::= "[" Expr? "]"
  1020. BlockExpr
  1021. ::= '{' StatementsAndOptionalExpr '}'
  1022. FunctionDecl
  1023. ::= 'function' EQName '(' ParamList? ')' ( 'as' SequenceType )? ( '{' StatementsAndOptionalExpr '}' | 'external' )
  1024. <?TOKENS?>
  1025. PragmaContents
  1026. ::= ( Char* - ( Char* '#)' Char* ) ) &'#'
  1027. DirCommentContents
  1028. ::= ( ( Char - '-' ) | '-' ( Char - '-' ) )*
  1029. DirPIContents
  1030. ::= ( Char* - ( Char* '?>' Char* ) ) &'?'
  1031. CDataSection
  1032. ::= '<![CDATA[' CDataSectionContents ']]>'
  1033. CDataSectionContents
  1034. ::= Char* - ( Char* ']]>' Char* )
  1035. Wildcard ::= "*"
  1036. | (NCName ":" "*")
  1037. | ("*" ":" NCName)
  1038. | (BracedURILiteral "*")
  1039. EQName ::= QName
  1040. | URIQualifiedName
  1041. URIQualifiedName
  1042. ::= BracedURILiteral NCName
  1043. BracedURILiteral
  1044. ::= 'Q' '{' (PredefinedEntityRef | CharRef | [^&{}] )* '}'
  1045. URILiteral
  1046. ::= StringLiteral
  1047. IntegerLiteral
  1048. ::= Digits
  1049. DecimalLiteral
  1050. ::= '.' Digits
  1051. | Digits '.' [0-9]*
  1052. /* ws: explicit */
  1053. DoubleLiteral
  1054. ::= ( '.' Digits | Digits ( '.' [0-9]* )? ) [Ee] [+#x002D]? Digits
  1055. /* ws: explicit */
  1056. StringLiteral
  1057. ::= '"' ( PredefinedEntityRef | CharRef | EscapeQuot | [^"&] )* '"'
  1058. | "'" ( PredefinedEntityRef | CharRef | EscapeApos | [^&'] )* "'"
  1059. /* ws: explicit */
  1060. PredefinedEntityRef
  1061. ::= '&' ( 'lt' | 'gt' | 'amp' | 'quot' | 'apos' ) ';'
  1062. /* ws: explicit */
  1063. EscapeQuot
  1064. ::= '""'
  1065. EscapeApos
  1066. ::= "''"
  1067. ElementContentChar
  1068. ::= Char - [&<{}]
  1069. QuotAttrContentChar
  1070. ::= Char - ["&<{}]
  1071. AposAttrContentChar
  1072. ::= Char - [&'<{}]
  1073. PITarget ::= NCName - ( ( 'X' | 'x' ) ( 'M' | 'm' ) ( 'L' | 'l' ) )
  1074. Name ::= NameStartChar NameChar*
  1075. NameStartChar
  1076. ::= [:A-Z_a-z#x00C0-#x00D6#x00D8-#x00F6#x00F8-#x02FF#x0370-#x037D#x037F-#x1FFF#x200C-#x200D#x2070-#x218F#x2C00-#x2FEF#x3001-#xD7FF#xF900-#xFDCF#xFDF0-#xFFFD#x10000-#xEFFFF]
  1077. NameChar ::= NameStartChar
  1078. | [-.0-9#x00B7#x0300-#x036F#x203F-#x2040]
  1079. NCName ::= Name - ( Char* ':' Char* )
  1080. Char ::= [#x0009#x000A#x000D#x0020-#xD7FF#xE000-#xFFFD#x10000-#x10FFFF]
  1081. QName ::= PrefixedName
  1082. | UnprefixedName
  1083. PrefixedName
  1084. ::= Prefix ':' LocalPart
  1085. UnprefixedName
  1086. ::= LocalPart
  1087. Prefix ::= NCName
  1088. LocalPart
  1089. ::= NCName
  1090. S ::= [#x0009#x000A#x000D#x0020]+
  1091. CharRef ::= '&#' [0-9]+ ';'
  1092. | '&#x' [0-9A-Fa-f]+ ';'
  1093. Digits ::= [0-9]+
  1094. CommentContents
  1095. ::= ( ( Char+ - ( Char* ( '(:' | ':)' ) Char* ) ) - ( Char* '(' ) ) &':'
  1096. | ( Char+ - ( Char* ( '(:' | ':)' ) Char* ) ) &'('
  1097. EOF ::= $
  1098. NonNCNameChar
  1099. ::= $
  1100. | ':'
  1101. | ( Char - NameChar )
  1102. DelimitingChar
  1103. ::= NonNCNameChar
  1104. | '-'
  1105. | '.'
  1106. DelimitingChar
  1107. \\ IntegerLiteral DecimalLiteral DoubleLiteral
  1108. NonNCNameChar
  1109. \\ EQName^Token QName NCName^Token 'NaN' 'after' 'all'
  1110. 'allowing' 'ancestor' 'ancestor-or-self' 'and' 'any'
  1111. 'append' 'array' 'as' 'ascending' 'at' 'attribute'
  1112. 'base-uri' 'before' 'boundary-space' 'break' 'by' 'case'
  1113. 'cast' 'castable' 'catch' 'check' 'child' 'collation'
  1114. 'collection' 'comment' 'constraint' 'construction'
  1115. 'contains' 'content' 'context' 'continue' 'copy'
  1116. 'copy-namespaces' 'count' 'decimal-format'
  1117. 'decimal-separator' 'declare' 'default' 'delete'
  1118. 'descendant' 'descendant-or-self' 'descending'
  1119. 'diacritics' 'different' 'digit' 'distance' 'div'
  1120. 'document' 'document-node' 'element' 'else' 'empty'
  1121. 'empty-sequence' 'encoding' 'end' 'entire' 'eq' 'every'
  1122. 'exactly' 'except' 'exit' 'external' 'first' 'following'
  1123. 'following-sibling' 'for' 'foreach' 'foreign' 'from'
  1124. 'ft-option' 'ftand' 'ftnot' 'ftor' 'function' 'ge'
  1125. 'greatest' 'group' 'grouping-separator' 'gt' 'idiv' 'if'
  1126. 'import' 'in' 'index' 'infinity' 'inherit' 'insensitive'
  1127. 'insert' 'instance' 'integrity' 'intersect' 'into' 'is'
  1128. 'item' 'json' 'json-item' 'key' 'language' 'last' 'lax'
  1129. 'le' 'least' 'let' 'levels' 'loop' 'lowercase' 'lt'
  1130. 'minus-sign' 'mod' 'modify' 'module' 'most' 'namespace'
  1131. 'namespace-node' 'ne' 'next' 'no' 'no-inherit'
  1132. 'no-preserve' 'node' 'nodes' 'not' 'object' 'occurs'
  1133. 'of' 'on' 'only' 'option' 'or' 'order' 'ordered'
  1134. 'ordering' 'paragraph' 'paragraphs' 'parent'
  1135. 'pattern-separator' 'per-mille' 'percent' 'phrase'
  1136. 'position' 'preceding' 'preceding-sibling' 'preserve'
  1137. 'previous' 'processing-instruction' 'relationship'
  1138. 'rename' 'replace' 'return' 'returning' 'revalidation'
  1139. 'same' 'satisfies' 'schema' 'schema-attribute'
  1140. 'schema-element' 'score' 'self' 'sensitive' 'sentence'
  1141. 'sentences' 'skip' 'sliding' 'some' 'stable' 'start'
  1142. 'stemming' 'stop' 'strict' 'strip' 'structured-item'
  1143. 'switch' 'text' 'then' 'thesaurus' 'times' 'to'
  1144. 'treat' 'try' 'tumbling' 'type' 'typeswitch' 'union'
  1145. 'unique' 'unordered' 'updating' 'uppercase' 'using'
  1146. 'validate' 'value' 'variable' 'version' 'weight'
  1147. 'when' 'where' 'while' 'wildcards' 'window' 'with'
  1148. 'without' 'word' 'words' 'xquery' 'zero-digit'
  1149. '*' << Wildcard '*'^OccurrenceIndicator
  1150. EQName^Token
  1151. << 'after' 'ancestor' 'ancestor-or-self' 'and' 'as' 'ascending' 'attribute' 'before' 'case' 'cast' 'castable' 'child' 'collation' 'comment' 'copy' 'count' 'declare' 'default' 'delete' 'descendant' 'descendant-or-self' 'descending' 'div' 'document' 'document-node' 'element' 'else' 'empty' 'empty-sequence' 'end' 'eq' 'every' 'except' 'first' 'following' 'following-sibling' 'for' 'function' 'ge' 'group' 'gt' 'idiv' 'if' 'import' 'insert' 'instance' 'intersect' 'into' 'is' 'item' 'last' 'le' 'let' 'lt' 'mod' 'modify' 'module' 'namespace' 'namespace-node' 'ne' 'node' 'only' 'or' 'order' 'ordered' 'parent' 'preceding' 'preceding-sibling' 'processing-instruction' 'rename' 'replace' 'return' 'satisfies' 'schema-attribute' 'schema-element' 'self' 'some' 'stable' 'start' 'switch' 'text' 'to' 'treat' 'try' 'typeswitch' 'union' 'unordered' 'validate' 'where' 'with' 'xquery' 'contains' 'paragraphs' 'sentences' 'times' 'words' 'by' 'collection' 'allowing' 'at' 'base-uri' 'boundary-space' 'break' 'catch' 'construction' 'context' 'continue' 'copy-namespaces' 'decimal-format' 'encoding' 'exit' 'external' 'ft-option' 'in' 'index' 'integrity' 'lax' 'nodes' 'option' 'ordering' 'revalidation' 'schema' 'score' 'sliding' 'strict' 'tumbling' 'type' 'updating' 'value' 'variable' 'version' 'while' 'constraint' 'loop' 'returning' 'append' 'array' 'json-item' 'object' 'structured-item'
  1152. NCName^Token
  1153. << 'after' 'and' 'as' 'ascending' 'before' 'case' 'cast' 'castable' 'collation' 'count' 'default' 'descending' 'div' 'else' 'empty' 'end' 'eq' 'except' 'for' 'ge' 'group' 'gt' 'idiv' 'instance' 'intersect' 'into' 'is' 'le' 'let' 'lt' 'mod' 'modify' 'ne' 'only' 'or' 'order' 'return' 'satisfies' 'stable' 'start' 'to' 'treat' 'union' 'where' 'with' 'contains' 'paragraphs' 'sentences' 'times' 'words' 'by' 'ancestor' 'ancestor-or-self' 'attribute' 'child' 'comment' 'copy' 'declare' 'delete' 'descendant' 'descendant-or-self' 'document' 'document-node' 'element' 'empty-sequence' 'every' 'first' 'following' 'following-sibling' 'function' 'if' 'import' 'insert' 'item' 'last' 'module' 'namespace' 'namespace-node' 'node' 'ordered' 'parent' 'preceding' 'preceding-sibling' 'processing-instruction' 'rename' 'replace' 'schema-attribute' 'schema-element' 'self' 'some' 'switch' 'text' 'try' 'typeswitch' 'unordered' 'validate' 'variable' 'xquery' 'allowing' 'at' 'base-uri' 'boundary-space' 'break' 'catch' 'construction' 'context' 'continue' 'copy-namespaces' 'decimal-format' 'encoding' 'exit' 'external' 'ft-option' 'in' 'index' 'integrity' 'lax' 'nodes' 'option' 'ordering' 'revalidation' 'schema' 'score' 'sliding' 'strict' 'tumbling' 'type' 'updating' 'value' 'version' 'while' 'constraint' 'loop' 'returning'
  1154. <?ENCORE?>
  1155. <?xqlint
  1156. });
  1157. ?>