Feature matrix

JSONiq is 99% reliant on XQuery, a W3C standard. For everything taken over from the W3C standard, a brief, non-normative explanation is provided with a link to the corresponding part in the W3C specification.

Table 1. JSONiq features and the W3C standard

FeatureSpecification status
JSONiq Data Model
Atomic itemsW3C-conformant
Structured itemsJSONiq-specific
Function itemsW3C-conformant
Node items (XML)Omitted (optional support by some engines)
JSONiq Type System
Atomic typesW3C-conformant, but support for xs:ID, xs:IDREF, xs:IDREFS, xs:Name, xs:NCName, xs:ENTITY, xs:ENTITIES, xs:NOTATION omitted (except for engines also supporting XML)
js:null typeJSONiq-specific
js:item, js:atomic typesJSONiq-specific synonyms for item() and xs:anyAtomicType
Structured typesJSONiq-specific
Function typesW3C-conformant
Empty sequence typeJSONiq-specific notation () for empty-sequence()
XML node typesOmitted (optional support by engines supporting XML)
Concepts
Effective boolean valueW3C-conformant, extended with object, array and null semantics
AtomizationOmitted (optional support by engines supporting XML)
Expressions
Numeric literalsW3C-conformant
String literalsW3C-conformant, but escape is done with \ not with &
Boolean and null literalsJSONiq-specific
Variable referenceW3C-conformant
Parenthesized expressionsW3C-conformant
Context item expressionsW3C-conformant but $$ syntax instead of .
Static function callsW3C-conformant
Named function referenceW3C-conformant
Inline function expressionsW3C-conformant
Filter expressionsW3C-conformant
Dynamic function callsW3C-conformant
Path expressions (XML)Omitted (optional support by engines supporting XML, but relative paths must start with ./)
Object lookupJSONiq-specific
Array lookupJSONiq-specific
Array unboxingJSONiq-specific
Sequence expressionsW3C-conformant
Arithmetic expressionsW3C-conformant, no atomization needed (except for engines also supporting XML)
String concatenation expressionsW3C-conformant
Comparison expressionsW3C-conformant, no need to atomize or convert from untyped and untypedAtomic (except for engines also supporting XML)
Logical expressionsW3C-conformant
XML constructorsOmitted (optional support by engines supporting XML)
JSON (object and array) constructorsJSONiq-specific
FLWOR expressionsW3C-conformant
Unordered and ordered expressionsW3C-conformant
Conditional expressionsW3C-conformant
Switch expressionsW3C-conformant
Quantified expressionsW3C-conformant
Try-catch expressionsW3C-conformant
Instance-of expressionsW3C-conformant
Typeswitch expressionsW3C-conformant
Cast expressionsW3C-conformant
Castable expressionsW3C-conformant
Constructor functionsW3C-conformant, additional constructor function for null()
Treat expressionsW3C-conformant
Simple map operatorW3C-conformant
Validate expressionsOmitted (optional support by engines supporting XML)
Extension expressionsW3C-conformant
Static context
XPath 1.0 compatibility modeOmitted (optional support by engines supporting XML)
Statically known namespacesW3C-conformant
Default element/type namespaceW3C-conformant, strong recommendation for implementations to overwrite with the proxy namespace http://jsoniq.org/default-type-namespace to omit prefixes.
Default function namespaceW3C-conformant, strong recommendation for implementations to overwrite with http://jsoniq.org/default-function-namespace to omit prefixes.
In-scope schema definitionsOmitted (optional support by engines supporting XML)
In-scope variablesW3C-conformant
Context item static typeW3C-conformant
Statically known function signaturesW3C-conformant, augmented with all JSONiq builtin functions
Statically known collationsW3C-conformant
Default collationW3C-conformant
Construction modeOmitted (optional support by engines supporting XML)
Ordering modeW3C-conformant
Default order for empty sequencesW3C-conformant
Boundary-space policyOmitted (optional support by engines supporting XML)
Copy-namespaces modeOmitted (optional support by engines supporting XML)
Static Base URIW3C-conformant
Statically known documentsOmitted (optional support by engines supporting XML)
Statically known collectionsOmitted (optional support by engines supporting XML)
Statically known default collection typeOmitted (optional support by engines supporting XML)
Statically known decimal formatsW3C-conformant