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
| Feature | Specification status |
|---|---|
| JSONiq Data Model | |
| Atomic items | W3C-conformant |
| Structured items | JSONiq-specific |
| Function items | W3C-conformant |
| Node items (XML) | Omitted (optional support by some engines) |
| JSONiq Type System | |
| Atomic types | W3C-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 type | JSONiq-specific |
| js:item, js:atomic types | JSONiq-specific synonyms for item() and xs:anyAtomicType |
| Structured types | JSONiq-specific |
| Function types | W3C-conformant |
| Empty sequence type | JSONiq-specific notation () for empty-sequence() |
| XML node types | Omitted (optional support by engines supporting XML) |
| Concepts | |
| Effective boolean value | W3C-conformant, extended with object, array and null semantics |
| Atomization | Omitted (optional support by engines supporting XML) |
| Expressions | |
| Numeric literals | W3C-conformant |
| String literals | W3C-conformant, but escape is done with \ not with & |
| Boolean and null literals | JSONiq-specific |
| Variable reference | W3C-conformant |
| Parenthesized expressions | W3C-conformant |
| Context item expressions | W3C-conformant but $$ syntax instead of . |
| Static function calls | W3C-conformant |
| Named function reference | W3C-conformant |
| Inline function expressions | W3C-conformant |
| Filter expressions | W3C-conformant |
| Dynamic function calls | W3C-conformant |
| Path expressions (XML) | Omitted (optional support by engines supporting XML, but relative paths must start with ./) |
| Object lookup | JSONiq-specific |
| Array lookup | JSONiq-specific |
| Array unboxing | JSONiq-specific |
| Sequence expressions | W3C-conformant |
| Arithmetic expressions | W3C-conformant, no atomization needed (except for engines also supporting XML) |
| String concatenation expressions | W3C-conformant |
| Comparison expressions | W3C-conformant, no need to atomize or convert from untyped and untypedAtomic (except for engines also supporting XML) |
| Logical expressions | W3C-conformant |
| XML constructors | Omitted (optional support by engines supporting XML) |
| JSON (object and array) constructors | JSONiq-specific |
| FLWOR expressions | W3C-conformant |
| Unordered and ordered expressions | W3C-conformant |
| Conditional expressions | W3C-conformant |
| Switch expressions | W3C-conformant |
| Quantified expressions | W3C-conformant |
| Try-catch expressions | W3C-conformant |
| Instance-of expressions | W3C-conformant |
| Typeswitch expressions | W3C-conformant |
| Cast expressions | W3C-conformant |
| Castable expressions | W3C-conformant |
| Constructor functions | W3C-conformant, additional constructor function for null() |
| Treat expressions | W3C-conformant |
| Simple map operator | W3C-conformant |
| Validate expressions | Omitted (optional support by engines supporting XML) |
| Extension expressions | W3C-conformant |
| Static context | |
| XPath 1.0 compatibility mode | Omitted (optional support by engines supporting XML) |
| Statically known namespaces | W3C-conformant |
| Default element/type namespace | W3C-conformant, strong recommendation for implementations to overwrite with the proxy namespace http://jsoniq.org/default-type-namespace to omit prefixes. |
| Default function namespace | W3C-conformant, strong recommendation for implementations to overwrite with http://jsoniq.org/default-function-namespace to omit prefixes. |
| In-scope schema definitions | Omitted (optional support by engines supporting XML) |
| In-scope variables | W3C-conformant |
| Context item static type | W3C-conformant |
| Statically known function signatures | W3C-conformant, augmented with all JSONiq builtin functions |
| Statically known collations | W3C-conformant |
| Default collation | W3C-conformant |
| Construction mode | Omitted (optional support by engines supporting XML) |
| Ordering mode | W3C-conformant |
| Default order for empty sequences | W3C-conformant |
| Boundary-space policy | Omitted (optional support by engines supporting XML) |
| Copy-namespaces mode | Omitted (optional support by engines supporting XML) |
| Static Base URI | W3C-conformant |
| Statically known documents | Omitted (optional support by engines supporting XML) |
| Statically known collections | Omitted (optional support by engines supporting XML) |
| Statically known default collection type | Omitted (optional support by engines supporting XML) |
| Statically known decimal formats | W3C-conformant |
| Dynamic context | |
| Context item | W3C-conformant (but with syntax $$ not .) |
| Initial context item | W3C-conformant |
| Context position | W3C-conformant |
| Context size | W3C-conformant |
| Variable values | W3C-conformant |
| Named functions | W3C-conformant |
| Current dateTime | W3C-conformant |
| Implicit timezone | W3C-conformant |
| Default language | W3C-conformant |
| Default calendar | W3C-conformant |
| Default place | W3C-conformant |
| Available documents | Omitted (optional support by engines supporting XML) |
| Available text resources | W3C-conformant |
| Available node collections | Omitted (optional support by engines supporting XML) |
| Default node collection | Omitted (optional support by engines supporting XML) |
| Available resource collections | Omitted (optional support by engines supporting XML) |
| Default resource collection | Omitted (optional support by engines supporting XML) |
| Environment variables | W3C-conformant |