~juan457/+junk/zorba

« back to all changes in this revision

Viewing changes to src/diagnostics/diagnostic_en.xml

  • Committer: Markos Zaharioudakis
  • Date: 2012-07-11 15:38:39 UTC
  • mfrom: (10924 zorba)
  • mto: This revision was merged to the branch mainline in revision 10932.
  • Revision ID: markos_za@yahoo.com-20120711153839-0mkh15cg2ubknchd
work in progress

Show diffs side-by-side

added added

removed removed

Lines of Context:
2538
2538
 
2539
2539
  <namespace prefix="jerr">
2540
2540
 
2541
 
    <!--////////// CloudScript ///////////////////////////////////////////-->
2542
 
 
 
2541
    <!--////////// JSONiq ///////////////////////////////////////////-->
 
2542
 
 
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>
 
2546
    </diagnostic>
 
2547
 
 
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>
 
2551
    </diagnostic>
 
2552
    
 
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>
 
2556
    </diagnostic>
 
2557
    
 
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>
 
2561
    </diagnostic>
 
2562
 
 
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>
 
2565
 
 
2566
      <value>"$1": duplicate pair to insert</value>
 
2567
 
 
2568
    </diagnostic>
 
2569
    
 
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>
 
2572
 
 
2573
      <value>"$1": pair to insert already exists in object.</value>
 
2574
 
 
2575
    </diagnostic>
 
2576
    
 
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>
 
2579
      
 
2580
      <value>$1 - wrong type for object/array selector in update expression.</value>
 
2581
      
 
2582
      <entry key="Object">
 
2583
        <value>"$2": can not be promoted to type xs:string</value>
 
2584
      </entry>
 
2585
 
 
2586
      <entry key="Array">
 
2587
        <value>"$2": can not be promoted to type xs:integer</value>
 
2588
      </entry>
 
2589
 
 
2590
      <entry key="ObjectArray">
 
2591
        <value>"$2": can not be promoted to type xs:anyAtomicType</value>
 
2592
      </entry>
 
2593
 
 
2594
    </diagnostic>
 
2595
    
 
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>
 
2602
 
 
2603
      <value>$1</value>
 
2604
 
 
2605
      <entry key="Object">
 
2606
        <value>"$2": target of a renaming expression or of a non-position-inserting expression is not an object.</value>
 
2607
      </entry>
 
2608
 
 
2609
      <entry key="Array">
 
2610
        <value>"$2": target of an appending expression or of a position-inserting expression is not an array</value>
 
2611
      </entry>
 
2612
 
 
2613
      <entry key="ObjectArray">
 
2614
        <value>"$2": target of a deleting or replacing expression is not a JSON item.</value>
 
2615
      </entry>
 
2616
 
 
2617
    </diagnostic>
 
2618
    
 
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>
 
2622
    </diagnostic>
 
2623
    
 
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>
 
2627
    </diagnostic>
 
2628
    
 
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>
 
2632
    </diagnostic>
 
2633
    
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.
2547
2638
      </comment>
2548
2639
 
2549
2640
      <value>Cannot serialize multiple top-level items as JSON</value>
2552
2643
    <diagnostic code="JNSE0013" if="defined(ZORBA_WITH_JSON)">
2553
2644
      <comment>It is a dynamic error to serialize an atomic value not
2554
2645
      supported by JSON or a node with the JSON output method and with
2555
 
      the cloudscript-serialization-extensions serialization parameter
 
2646
      the jsoniq-serialization-extensions serialization parameter
2556
2647
      set to false.</comment>
2557
2648
 
2558
2649
      <value>Cannot serialize value as JSON: $1</value>
2564
2655
      <value>Cannot serialize a function item as JSON</value>
2565
2656
    </diagnostic>
2566
2657
 
 
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>
 
2660
 
 
2661
      <value>$1</value>
 
2662
      
 
2663
      <entry key="Object">
 
2664
        <value>"$2": selector cannot be resolved against supplied object.</value>
 
2665
      </entry>
 
2666
 
 
2667
      <entry key="Array">
 
2668
        <value>"$2": selector cannot be resolved against supplied array.</value>
 
2669
      </entry>
 
2670
    </diagnostic>
 
2671
    
 
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>
 
2675
    </diagnostic>
 
2676
    
2567
2677
    <!--////////// JSONIQ ///////////////////////////////////////////-->
2568
2678
 
2569
 
    <diagnostic code="JNTY0002" if="defined(ZORBA_WITH_JSON)">
2570
 
      <comment>Expression computing the value of a pair does not return exactly
2571
 
      one item.</comment>
2572
 
 
2573
 
      <value>$1</value>
2574
 
    </diagnostic>
2575
 
 
2576
2679
    <diagnostic code="JNTY0003" if="defined(ZORBA_WITH_JSON)">
2577
2680
      <comment>objects or arrays don't have a string value</comment>
2578
2681
 
2579
2682
      <value>$1 items do not have string value</value>
2580
2683
    </diagnostic>
2581
2684
 
2582
 
    <diagnostic code="JNTY0004" if="defined(ZORBA_WITH_JSON)">
2583
 
      <comment>objects or arrays don't have a typed value</comment>
2584
 
 
2585
 
      <value>$1 items do not have typed value</value>
2586
 
    </diagnostic>
2587
 
 
2588
 
    <diagnostic code="JNTY0007" if="defined(ZORBA_WITH_JSON)">
2589
 
      <comment>wrong type for object/array selector in update expr</comment>
2590
 
 
2591
 
      <value>$1</value>
2592
 
 
2593
 
     <entry key="Object">
2594
 
        <value>"$2": can not be promoted to type xs:string</value>
2595
 
      </entry>
2596
 
 
2597
 
     <entry key="Array">
2598
 
        <value>"$2": can not be promoted to type xs:integer</value>
2599
 
      </entry>
2600
 
 
2601
 
    </diagnostic>
2602
 
 
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>
2606
 
    </diagnostic>
2607
 
 
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>
2611
 
    </diagnostic>
2612
 
 
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>
2616
2688
    </diagnostic>
2617
2689
 
2618
 
    <!-- jsoniq object updates -->
2619
 
 
2620
 
    <diagnostic code="JNUP0005" if="defined(ZORBA_WITH_JSON)">
2621
 
      <comment>duplicate pair to insert</comment>
2622
 
      <value>"$1": duplicate pair to insert</value>
2623
 
    </diagnostic>
2624
 
 
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>
2628
 
    </diagnostic>
2629
 
 
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>
2633
 
    </diagnostic>
2634
 
 
2635
 
    <diagnostic code="JNUP0008" if="defined(ZORBA_WITH_JSON)">
2636
 
      <comment>duplicate pair to replace</comment>
2637
 
      <value>"$1": duplicate pair to replace</value>
2638
 
    </diagnostic>
2639
 
 
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>
2643
 
    </diagnostic>
2644
 
 
2645
 
    <diagnostic code="JNUP0010" if="defined(ZORBA_WITH_JSON)">
2646
 
      <comment>duplicate pair to rename</comment>
2647
 
      <value>"$1": duplicate pair to rename</value>
2648
 
    </diagnostic>
2649
 
 
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>
2653
 
    </diagnostic>
2654
 
 
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>
2658
 
    </diagnostic>
2659
 
 
2660
 
    <!-- jsoniq array updates -->
2661
 
 
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>
2665
 
    </diagnostic>
2666
 
 
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>
2670
 
    </diagnostic>
2671
 
 
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>
2675
 
    </diagnostic>
2676
 
 
2677
 
    <diagnostic code="JNUP0022" if="defined(ZORBA_WITH_JSON)">
2678
 
      <comment>duplicate position to replace</comment>
2679
 
      <value>"$1": duplicate position to replace</value>
2680
 
    </diagnostic>
2681
 
 
2682
2690
  </namespace>
2683
2691
 
2684
2692
  <!--////////// Zorba Warnings ////////////////////////////////////////////-->
3673
3681
      <value>JSON serialization error</value>
3674
3682
    </entry>
3675
3683
 
 
3684
    <entry key="JSONiq error">
 
3685
      <value>JSONIQ error</value>
 
3686
    </entry>
 
3687
 
3676
3688
    <entry key="dynamic error">
3677
3689
      <value>dynamic error</value>
3678
3690
    </entry>