The grammar into XQuery and SPARQL parts. Added objects are set in bold: insert; Deleted objects are set strikethrough: deleted. Changed production rules are also set in bold. Some of the links in the XQuery section are currently broken.
See also the XQuery grammar and the SPARQL grammar.
The following symbols are used only in the definition of terminal symbols; they are not terminal symbols in the grammar of A.1 EBNF.
[158] | Digits |
::= | [0-9]+ |
[159] | CommentContents |
::= | (Char+ - (Char* ('(:' |
':)') Char*)) |
Keep in mind that for XSPARQL only lowercase keywords are allowed. To retain the original grammar as much as possible, keywords are mostly set in uppercase.
[70] |
IRI_REF |
::= | '<' ([^<>"{}|^`\]-[#x00-#x20])* '>' |
[71] |
PNAME_NS |
::= | PN_PREFIX? ':' |
[72] |
PNAME_LN |
::= | PNAME_NS PN_LOCAL |
[73] |
BLANK_NODE_LABEL |
::= | '_:' PN_LOCAL |
[74] |
VAR1 |
::= | '?' VARNAME |
[75] |
VAR2 |
::= | '$' VARNAME |
[76] |
LANGTAG |
::= | '@' [a-zA-Z]+ ('-' [a-zA-Z0-9]+)* |
[77] |
INTEGER |
::= | [0-9]+ |
[78] |
DECIMAL |
::= | [0-9]+ '.' [0-9]* | '.' [0-9]+ |
[79] |
DOUBLE |
::= | [0-9]+ '.' [0-9]* EXPONENT | '.' ([0-9])+ EXPONENT | ([0-9])+ EXPONENT |
[80] |
INTEGER_POSITIVE |
::= | '+' INTEGER |
[81] |
DECIMAL_POSITIVE |
::= | '+' DECIMAL |
[82] |
DOUBLE_POSITIVE |
::= | '+' DOUBLE |
[83] |
INTEGER_NEGATIVE |
::= | '-' INTEGER |
[84] |
DECIMAL_NEGATIVE |
::= | '-' DECIMAL |
[85] |
DOUBLE_NEGATIVE |
::= | '-' DOUBLE |
[86] |
EXPONENT |
::= | [eE] [+-]? [0-9]+ |
[87] |
STRING_LITERAL1 |
::= | "'" ( ([^#x27#x5C#xA#xD]) | ECHAR )* "'" |
[88] |
STRING_LITERAL2 |
::= | '"' ( ([^#x22#x5C#xA#xD]) | ECHAR )* '"' |
[89] |
STRING_LITERAL_LONG1 |
::= | "'''" ( ( "'" | "''" )? ( [^'\] | ECHAR ) )* "'''" |
[90] |
STRING_LITERAL_LONG2 |
::= | '"""' ( ( '"' | '""' )? ( [^"\] | ECHAR ) )* '"""' |
[91] |
ECHAR |
::= | '\' [tbnrf\"'] |
[92] |
NIL |
::= | '(' WS* ')' |
[93] |
WS |
::= | #x20 | #x9 | #xD | #xA |
[94] |
ANON |
::= | '[' WS* ']' |
[95] |
PN_CHARS_BASE |
::= | [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] |
[96] |
PN_CHARS_U |
::= | PN_CHARS_BASE |
[97] |
VARNAME |
::= | ( PN_CHARS_U - '_' | [0-9] ) ( PN_CHARS_U | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040] )* |
[98] |
PN_CHARS |
::= | PN_CHARS_U | '-' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040] |
[99] |
PN_PREFIX |
::= | PN_CHARS_BASE ((PN_CHARS|'.')* PN_CHARS)? |
[100] |
PN_LOCAL |
::= | ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)? Note that SPARQL local names allow leading digits while XML local names do not. |