• +49-(0)721-402485-12
Ihre Experten für XML, XQuery und XML-Datenbanken

Nichtterminale Symbole (Teil 1)

[30]Module::=VersionDecl? (MainModule | LibraryModule)
[31]MainModule::=Prolog QueryBody
[32]LibraryModule::=ModuleDecl Prolog
[33]ModuleDecl::=<"module" "namespace"> NCName "=" StringLiteral Separator
[34]Prolog::=((NamespaceDecl
| XMLSpaceDecl
| DefaultNamespaceDecl
| DefaultCollationDecl
| BaseURIDecl
| SchemaImport
| ModuleImport
| VarDecl
| ValidationDecl
| FunctionDecl) Separator)*
[35]Separator::=";"
[36]VersionDecl::=<"xquery" "version" StringLiteral> Separator
[37]ModuleImport::=<"import" "module" ("namespace" NCName "=")? StringLiteral <"at" StringLiteral>?
[38]VarDecl::=<"declare" "variable" "$" VarName TypeDeclaration? (("{" Expr "}") | "external")>
[39]QueryBody::=Expr
[40]Expr::=ExprSingle ("," ExprSingle)*
[41]ExprSingle::=FLWORExpr | QuantifiedExpr
| TypeswitchExpr
| IfExpr
| OrExpr
[42]FLWORExpr::=(ForClause | LetClause)+ WhereClause? OrderByClause? "return" ExprSingle
[43]ForClause::=<"for" "$"> VarName TypeDeclaration? PostitionalVar? "in" ExprSingle ("," "$" VarName TypeDeclaration? PositionalVar? "in" ExprSingle)*
[44]PositionalVar::="at" "$" VarName
[45]LetClause::=<"let" "$"> VarName TypeDeclaration ? ":=" ExprSingle ("," "$" VarName TypeDeclaration ? ":=" ExprSingle)*
[46]WhereClause::="where" Expr
[47]OrderByClause::=(<"order" "by"> | <"stable" "order" "by">) OrderSpecList
[48]OrderSpecList::=OrderSpec ("," OrderSpec)*
[49]OrderSpec::=ExprSingle OrderModifier
[50]OrderModifier::=("ascending" | "descending")? (<"empty" "greatest"> | <"empty" "least">)? ("collation" StringLiteral )?
[51]QuantifiedExpr::=(<"some" "$"> | <"every" "$">) VarName TypeDeclaration ? "in" ExprSingle ("," "$" VarName TypeDeclaration? "in" ExprSingle)* "satisfies" ExprSingle
[52]TypeswitchExpr::=<"typeswitch" "("> Expr ")" CaseClause + "default" ("$" VarName)? "return" ExprSingle
[53]CaseClause::="case" ("$" VarName "as")? SequenceType "return" ExprSingle
[54]IfExpr::=<"if" "("> Expr ")" "then" ExprSingle "else" ExprSingle
[55]OrExpr::=AndExpr ( "or" AndExpr )*
[56]AndExpr::=InstanceofExpr ( "and" InstanceofExpr )*
[57]InstanceofExpr::=TreatExpr ( <"instance" "of"> SequenceType )?
[58]TreatExpr::=CastableExpr ( <"treat" "as"> SequenceType )?
[59]CastableExpr::=CastExpr ( <"castable" "as"> SingleType )?
[60]CastExpr::=ComparisonExpr ( <"cast" "as"> SingleType )?
[61]ComparisonExpr::=RangeExpr ( (ValueComp
| GeneralComp
| NodeComp ) RangeExpr)?
[62]RangeExpr::=AdditiveExpr ( "to" AdditiveExpr )?
[63]AdditiveExpr::=MultiplicativeExpr ( ("+" | "-") MultiplicativeExpr )*
[64]MultiplicativeExpr::=UnaryExpr ( ("*" | "div" | "idiv" | "mod")
UnaryExpr )*
[65]UnaryExpr::=("-" | "+")* UnionExpr
[66]UnionExpr::=IntersectExceptExpr ( ("union" | "|") IntersectExceptExpr )*
[67]IntersectExceptExpr::=ValueExpr ( ("intersect" | "except") ValueExpr )*
[68]ValueExpr::=ValidateExpr | PathExpr
[69]PathExpr::=("/" RelativePathExpr?)
| ("//" RelativePathExpr)
| RelativePathExpr
[70]RelativePathExpr::=StepExpr (("/" | "//") StepExpr)*
[71]StepExpr::=AxisStep | FilterStep
[72]AxisStep::=(ForwardStep | ReverseStep) Predicates
[73]FilterStep::=PrimaryExpr Predicates
[74]ContextItemExpr::="."
[75]PrimaryExpr::=Literal | VarRef | ParenthesizedExpr | ContextItemExpr | FunctionCall | Constructor
[76]VarRef::="$" VarName
[77]Predicates::=("[" Expr "]")*
[78]ValidateExpr::=(<"validate" "{"> | (<"validate" "global"> "{") | (<"validate" "context"> SchemaContextLoc "{") | (<"validate" SchemaMode > SchemaContext ? "{")) Expr "}"
[79]SchemaContext::=("context" SchemaContextLoc) | "global"
[80]Constructor::=DirElemConstructor
| ComputedConstructor
| XmlComment
| XmlPI
| CdataSection
[81]ComputedConstructor::=CompElemConstructor
| CompAttrConstructor
| CompDocConstructor
| CompTextConstructor
| CompXmlPI
| CompXmlComment
| CompNSConstructor
[82]GeneralComp::="=" | "!=" | "<" | "<=" | ">" | ">="
[83]ValueComp::="eq" | "ne" | "lt" | "le" | "gt" | "ge"
[84]NodeComp::="is" | "<<" | ">>"
[85]ForwardStep::=(ForwardAxis NodeTest) | AbbrevForwardStep
[86]ReverseStep::=(ReverseAxis NodeTest) | AbbrevReverseStep
[87]AbbrevForwardStep::="@"? NodeTest
[88]AbbrevReverseStep::=".."
[89]ForwardAxis::=<"child" "::">
| <"descendant" "::">
| <"attribute" "::">
| <"self" "::">
| <"descendant-or-self" "::">
| <"following-sibling" "::">
| <"following" "::">
[90]ReverseAxis::=<"parent" "::">
| <"ancestor" "::">
| <"preceding-sibling" "::">
| <"preceding" "::">
| <"ancestor-or-self" "::">

 

Quelle: "XQuery – Grundlagen und fortgeschrittene Methoden", dpunkt-Verlag, Heidelberg (2004)

<< zurückvor >>