2539
2539
<namespace prefix="jerr">
2541
<!--////////// CloudScript ///////////////////////////////////////////-->
2541
<!--////////// JSONiq ///////////////////////////////////////////-->
2543
<diagnostic code="JNTY0001" if="defined(ZORBA_WITH_JSON)">
2544
<comment>It is a type error if the left-hand-side expression of a pair constructor cannot be atomized and cast to a string.</comment>
2545
<value>Cannot atomize and/or cast value of type $1 to a string.</value>
2548
<diagnostic code="JNTY0002" if="defined(ZORBA_WITH_JSON)">
2549
<comment>It is a type error if the right-hand-side expression of a pair constructor does not return exactly one item.</comment>
2550
<value>Pair value returns no, or more than one, item.</value>
2553
<diagnostic code="JNDY0003" if="defined(ZORBA_WITH_JSON)">
2554
<comment>It is a dynamic error if two pairs in an object constructor or in a simple object union have the same name.</comment>
2555
<value>"$1": pair with the same name already exists in object.</value>
2558
<diagnostic code="JNTY0004" if="defined(ZORBA_WITH_JSON)">
2559
<comment>It is a type error to call fn:data on a sequence containing an array or an object.</comment>
2560
<value>$1 items do not have typed value</value>
2563
<diagnostic code="JNUP0005" if="defined(ZORBA_WITH_JSON)">
2564
<comment>It is a dynamic error if a pending update list contains two inserting update primitives on the same object and pair name.</comment>
2566
<value>"$1": duplicate pair to insert</value>
2570
<diagnostic code="JNUP0006" if="defined(ZORBA_WITH_JSON)">
2571
<comment>It is a dynamic error if upd:applyUpdates causes an object to contain two pairs with the same name.</comment>
2573
<value>"$1": pair to insert already exists in object.</value>
2577
<diagnostic code="JNUP0007" if="defined(ZORBA_WITH_JSON)">
2578
<comment>It is a type error if, in an updating expression, an array selector cannot be cast to xs:integer or if an object selector cannot be cast to xs:string.</comment>
2580
<value>$1 - wrong type for object/array selector in update expression.</value>
2582
<entry key="Object">
2583
<value>"$2": can not be promoted to type xs:string</value>
2587
<value>"$2": can not be promoted to type xs:integer</value>
2590
<entry key="ObjectArray">
2591
<value>"$2": can not be promoted to type xs:anyAtomicType</value>
2596
<diagnostic code="JNUP0008" if="defined(ZORBA_WITH_JSON)">
2597
<comment>It is a dynamic error if the target of a deleting or replacing expression is not an array or an object.
2598
It is a dynamic error if the target of a renaming expression is not an object.
2599
It is a dynamic error if the target of an appending expression is not an array.
2600
It is a dynamic error if the target of a position-inserting expression is not an array.
2601
It is a dynamic error if the target of a non-position-inserting expression is not an object.</comment>
2605
<entry key="Object">
2606
<value>"$2": target of a renaming expression or of a non-position-inserting expression is not an object.</value>
2610
<value>"$2": target of an appending expression or of a position-inserting expression is not an array</value>
2613
<entry key="ObjectArray">
2614
<value>"$2": target of a deleting or replacing expression is not a JSON item.</value>
2619
<diagnostic code="JNUP0009" if="defined(ZORBA_WITH_JSON)">
2620
<comment>It is a dynamic error if a pending update list contains two replacing update primitives on the same object or array, and with the same selector.</comment>
2621
<value>"$1": duplicate pair to replace</value>
2624
<diagnostic code="JNUP0010" if="defined(ZORBA_WITH_JSON)">
2625
<comment>It is a dynamic error if a pending update list contains two renaming update primitives on the same object and with the same selector.</comment>
2626
<value>"$1": duplicate pair to rename</value>
2629
<diagnostic code="JNTY0011" if="defined(ZORBA_WITH_JSON)">
2630
<comment>It is a type error if the content sequence in a node constructor or in an XQUF insert or replace update expression contains an object or an array.</comment>
2631
<value>JSON item cannot appear in content sequence of node constructor or updating expression</value>
2543
2634
<diagnostic code="JNSE0012" if="defined(ZORBA_WITH_JSON)">
2544
2635
<comment>It is a dynamic error to serialize a sequence of less
2545
2636
or more than one item with the JSON output method if the
2546
cloudscript-serialization-multiple-items is set to no.
2637
jsoniq-serialization-multiple-items is set to no.
2549
2640
<value>Cannot serialize multiple top-level items as JSON</value>
2564
2655
<value>Cannot serialize a function item as JSON</value>
2658
<diagnostic code="JNUP0016" if="defined(ZORBA_WITH_JSON)">
2659
<comment>It is a dynamic error if it is attempted to create a replace, delete or rename update primitive with a selector that cannot be resolved against the target array or object.</comment>
2663
<entry key="Object">
2664
<value>"$2": selector cannot be resolved against supplied object.</value>
2668
<value>"$2": selector cannot be resolved against supplied array.</value>
2672
<diagnostic code="JNUP0017" if="defined(ZORBA_WITH_JSON)">
2673
<comment> It is a dynamic error if the value in a replace expression is not exactly a single item.</comment>
2674
<value>Cannot replace with less or more than an item.</value>
2567
2677
<!--////////// JSONIQ ///////////////////////////////////////////-->
2569
<diagnostic code="JNTY0002" if="defined(ZORBA_WITH_JSON)">
2570
<comment>Expression computing the value of a pair does not return exactly
2576
2679
<diagnostic code="JNTY0003" if="defined(ZORBA_WITH_JSON)">
2577
2680
<comment>objects or arrays don't have a string value</comment>
2579
2682
<value>$1 items do not have string value</value>
2582
<diagnostic code="JNTY0004" if="defined(ZORBA_WITH_JSON)">
2583
<comment>objects or arrays don't have a typed value</comment>
2585
<value>$1 items do not have typed value</value>
2588
<diagnostic code="JNTY0007" if="defined(ZORBA_WITH_JSON)">
2589
<comment>wrong type for object/array selector in update expr</comment>
2593
<entry key="Object">
2594
<value>"$2": can not be promoted to type xs:string</value>
2598
<value>"$2": can not be promoted to type xs:integer</value>
2603
<diagnostic code="JNTY0011" if="defined(ZORBA_WITH_JSON)">
2604
<comment>error raised by node constructor or updating expression indicating that a JSON item cannot appear in the corresponding content sequence</comment>
2605
<value>JSON item cannot appear in content sequence of node constructor or updating expression</value>
2608
<diagnostic code="JNDY0003" if="defined(ZORBA_WITH_JSON)">
2609
<comment>error raised by object constructor</comment>
2610
<value>"$1": pair with the same name already exists in object</value>
2613
2685
<diagnostic code="JSDY0040" if="defined(ZORBA_WITH_JSON)">
2614
2686
<comment>parser errors raised by the JSONIQLoader</comment>
2615
2687
<value>$1</value>
2618
<!-- jsoniq object updates -->
2620
<diagnostic code="JNUP0005" if="defined(ZORBA_WITH_JSON)">
2621
<comment>duplicate pair to insert</comment>
2622
<value>"$1": duplicate pair to insert</value>
2625
<diagnostic code="JNUP0006" if="defined(ZORBA_WITH_JSON)">
2626
<comment>pair to insert already in object</comment>
2627
<value>"$1": pair to insert already exists in object</value>
2630
<diagnostic code="JNUP0007" if="defined(ZORBA_WITH_JSON)">
2631
<comment>pair to delete not in object</comment>
2632
<value>"$1": pair to delete does not exist in object</value>
2635
<diagnostic code="JNUP0008" if="defined(ZORBA_WITH_JSON)">
2636
<comment>duplicate pair to replace</comment>
2637
<value>"$1": duplicate pair to replace</value>
2640
<diagnostic code="JNUP0009" if="defined(ZORBA_WITH_JSON)">
2641
<comment>pair to replace not in object</comment>
2642
<value>"$1": pair to replace does not exist in object</value>
2645
<diagnostic code="JNUP0010" if="defined(ZORBA_WITH_JSON)">
2646
<comment>duplicate pair to rename</comment>
2647
<value>"$1": duplicate pair to rename</value>
2650
<diagnostic code="JNUP0011" if="defined(ZORBA_WITH_JSON)">
2651
<comment>pair to rename not in object</comment>
2652
<value>"$1": pair to rename does not exist in object</value>
2655
<diagnostic code="JNUP0012" if="defined(ZORBA_WITH_JSON)">
2656
<comment>pair to rename already in object</comment>
2657
<value>"$1": pair to rename already exists in object</value>
2660
<!-- jsoniq array updates -->
2662
<diagnostic code="JNUP0018" if="defined(ZORBA_WITH_JSON)">
2663
<comment>position to insert not in array</comment>
2664
<value>"$1": position to insert at is out of array bounds</value>
2667
<diagnostic code="JNUP0020" if="defined(ZORBA_WITH_JSON)">
2668
<comment>position to delete not in array</comment>
2669
<value>"$1": position to delete does not exist in array</value>
2672
<diagnostic code="JNUP0021" if="defined(ZORBA_WITH_JSON)">
2673
<comment>position to replace not in array</comment>
2674
<value>"$1": position to replace does not exist in array</value>
2677
<diagnostic code="JNUP0022" if="defined(ZORBA_WITH_JSON)">
2678
<comment>duplicate position to replace</comment>
2679
<value>"$1": duplicate position to replace</value>
2684
2692
<!--////////// Zorba Warnings ////////////////////////////////////////////-->