Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/pjl-misc into lp:zorba.

Commit message:
Updated FOFD1340 to be an error for $picture, $language, $calendar, or $place 
based on e-mail reply on W3C mailing list.

Requested reviews:
  Paul J. Lucas (paul-lucas)

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/170099

Updated FOFD1340 to be an error for $picture, $language, $calendar, or $place 
based on e-mail reply on W3C mailing list.
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/170099
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'modules/w3c/pregenerated/xqt-errors.xq'
--- modules/w3c/pregenerated/xqt-errors.xq	2013-04-29 00:12:35 +0000
+++ modules/w3c/pregenerated/xqt-errors.xq	2013-06-18 14:33:55 +0000
@@ -955,8 +955,9 @@
 
 (:~
  :
- : It is a non-recoverable dynamic error if the syntax of the picture is
- : incorrect.
+ : It is a non-recoverable dynamic error if the $picture, $language,
+ : $calendar, or $place argument for fn:format-date, fn:format-time, or
+ : fn:format-dateTime is invalid.
  : 
  : @see http://www.w3.org/2005/xqt-errors
 :)

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2013-06-18 02:28:10 +0000
+++ src/diagnostics/diagnostic_en.xml	2013-06-18 14:33:55 +0000
@@ -1130,33 +1130,46 @@
 
     <diagnostic code="FOFD1340">
       <comment>
-        It is a non-recoverable dynamic error if the syntax of the picture is
-        incorrect.
+        It is a non-recoverable dynamic error if the $picture, $language,
+        $calendar, or $place argument for fn:format-date, fn:format-time, or
+        fn:format-dateTime is invalid.
       </comment>
-      <value>"$1": invalid picture string for date/time${: 2}</value>
-      <entry key="BadCalendar">
-        <value>invalid calendar designator</value>
-      </entry>
-      <entry key="BadComponent_3">
-        <value>'$3': invalid component specifier</value>
-      </entry>
-      <entry key="Bad2ndModifier_3">
-        <value>'$3': invalid second presentation modifier</value>
-      </entry>
-      <entry key="Bad2ndModifierHere_3">
-        <value>'$3': valid second presentation modifier invalid here</value>
+      <value>"$1": invalid \$$2 argument for date/time${: 3}</value>
+      <entry key="Picture">
+        <value>picture</value>
+      </entry>
+      <entry key="Language">
+        <value>language</value>
+      </entry>
+      <entry key="Calendar">
+        <value>calendar</value>
+      </entry>
+      <entry key="Place">
+        <value>place</value>
+      </entry>
+      <entry key="BadCalendarDesignator">
+        <value>unknown designator</value>
+      </entry>
+      <entry key="BadComponent_4">
+        <value>'$4': invalid component specifier</value>
+      </entry>
+      <entry key="Bad2ndModifier_4">
+        <value>'$4': invalid second presentation modifier</value>
+      </entry>
+      <entry key="Bad2ndModifierHere_4">
+        <value>'$4': valid second presentation modifier invalid here</value>
       </entry>
       <entry key="BadWidthModifier">
         <value>invalid width modifier</value>
       </entry>
-      <entry key="DigitNotSameFamily_34">
-        <value>"$3": digit not from same digit family as $4</value>
-      </entry>
-      <entry key="Dup2ndModifier_3">
-        <value>"$3": duplicate second presentation modifier</value>
-      </entry>
-      <entry key="MultipleComponent_3">
-        <value>'$3': multiple component specifiers between []</value>
+      <entry key="DigitNotSameFamily_45">
+        <value>"$4": digit not from same digit family as $5</value>
+      </entry>
+      <entry key="Dup2ndModifier_4">
+        <value>"$4": duplicate second presentation modifier</value>
+      </entry>
+      <entry key="MultipleComponent_4">
+        <value>'$4': multiple component specifiers between []</value>
       </entry>
       <entry key="MustBeOneMandatoryDigit">
         <value>there must be at least one mandatory-digit-sign</value>
@@ -1164,14 +1177,14 @@
       <entry key="NoComponent">
         <value>component specifier expected between []</value>
       </entry>
-      <entry key="NoAdjacentGroupSep_3">
-        <value>"$3": grouping separator must not be adjacent to others</value>
-      </entry>
-      <entry key="NoGroupSepAtStart_3">
-        <value>"$3": grouping separator illegal at start of decimal-digit-pattern</value>
-      </entry>
-      <entry key="NoGroupSepAtEnd_3">
-        <value>"$3": grouping separator illegal at end of decimal-digit-pattern</value>
+      <entry key="NoAdjacentGroupSep_4">
+        <value>"$4": grouping separator must not be adjacent to others</value>
+      </entry>
+      <entry key="NoGroupSepAtStart_4">
+        <value>"$4": grouping separator illegal at start of decimal-digit-pattern</value>
+      </entry>
+      <entry key="NoGroupSepAtEnd_4">
+        <value>"$4": grouping separator illegal at end of decimal-digit-pattern</value>
       </entry>
       <entry key="NoOptDigitAfterMandatory">
         <value>"#": optional-digit-sign must precede all mandatory-digit-signs</value>
@@ -3648,6 +3661,10 @@
       <value>'$3' expected</value>
     </entry>
 
+    <entry key="CharExpected_4">
+      <value>'$4' expected</value>
+    </entry>
+
     <entry key="CloneNotImplemented">
       <value>clone() not implemented for expression</value>
     </entry>

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2013-06-18 02:28:10 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp	2013-06-18 14:33:55 +0000
@@ -53,7 +53,7 @@
   { "FODT0002", "overflow/underflow in duration operation${: 1}" },
   { "FODT0003", "\"$1\": invalid timezone value (in seconds)" },
   { "FOER0000", "unidentifier error" },
-  { "FOFD1340", "\"$1\": invalid picture string for date/time${: 2}" },
+  { "FOFD1340", "\"$1\": invalid \\$$2 argument for date/time${: 3}" },
   { "FOFD1350", "\"$1\": component specifier not available" },
   { "FOFL0001", "dynamic call on context-dependent function item" },
   { "FONS0004", "\"$1\": no namespace found for prefix" },
@@ -556,6 +556,7 @@
   { "~BaseURI", "base URI" },
   { "~BoxCondTooManyColumns", "box condition has more columns than index" },
   { "~CharExpected_3", "'$3' expected" },
+  { "~CharExpected_4", "'$4' expected" },
   { "~CloneNotImplemented", "clone() not implemented for expression" },
   { "~ClosingBraceWithoutOpen", "'}' encountered without '{' first" },
   { "~CollectionIteratorNotOpen", "collection iterator not open" },
@@ -602,20 +603,24 @@
   { "~FODF1310_NoOptDigitAfterMandatory", "\"#\": optional-digit-sign must precede all mandatory-digit-signs" },
   { "~FODF1310_NoOptDigitAfterMandatory_3", "'$3': optional-digit-sign in integer part of sub-picture may not follow a member of the decimal-digit-family" },
   { "~FODF1310_NoPercentPermille", "sub-picture must not contain more than one percent-sign or per-mille-sign or one of each" },
-  { "~FOFD1340_Bad2ndModifierHere_3", "'$3': valid second presentation modifier invalid here" },
-  { "~FOFD1340_Bad2ndModifier_3", "'$3': invalid second presentation modifier" },
-  { "~FOFD1340_BadCalendar", "invalid calendar designator" },
-  { "~FOFD1340_BadComponent_3", "'$3': invalid component specifier" },
+  { "~FOFD1340_Bad2ndModifierHere_4", "'$4': valid second presentation modifier invalid here" },
+  { "~FOFD1340_Bad2ndModifier_4", "'$4': invalid second presentation modifier" },
+  { "~FOFD1340_BadCalendarDesignator", "unknown designator" },
+  { "~FOFD1340_BadComponent_4", "'$4': invalid component specifier" },
   { "~FOFD1340_BadWidthModifier", "invalid width modifier" },
-  { "~FOFD1340_DigitNotSameFamily_34", "\"$3\": digit not from same digit family as $4" },
-  { "~FOFD1340_Dup2ndModifier_3", "\"$3\": duplicate second presentation modifier" },
-  { "~FOFD1340_MultipleComponent_3", "'$3': multiple component specifiers between []" },
+  { "~FOFD1340_Calendar", "calendar" },
+  { "~FOFD1340_DigitNotSameFamily_45", "\"$4\": digit not from same digit family as $5" },
+  { "~FOFD1340_Dup2ndModifier_4", "\"$4\": duplicate second presentation modifier" },
+  { "~FOFD1340_Language", "language" },
+  { "~FOFD1340_MultipleComponent_4", "'$4': multiple component specifiers between []" },
   { "~FOFD1340_MustBeOneMandatoryDigit", "there must be at least one mandatory-digit-sign" },
-  { "~FOFD1340_NoAdjacentGroupSep_3", "\"$3\": grouping separator must not be adjacent to others" },
+  { "~FOFD1340_NoAdjacentGroupSep_4", "\"$4\": grouping separator must not be adjacent to others" },
   { "~FOFD1340_NoComponent", "component specifier expected between []" },
-  { "~FOFD1340_NoGroupSepAtEnd_3", "\"$3\": grouping separator illegal at end of decimal-digit-pattern" },
-  { "~FOFD1340_NoGroupSepAtStart_3", "\"$3\": grouping separator illegal at start of decimal-digit-pattern" },
+  { "~FOFD1340_NoGroupSepAtEnd_4", "\"$4\": grouping separator illegal at end of decimal-digit-pattern" },
+  { "~FOFD1340_NoGroupSepAtStart_4", "\"$4\": grouping separator illegal at start of decimal-digit-pattern" },
   { "~FOFD1340_NoOptDigitAfterMandatory", "\"#\": optional-digit-sign must precede all mandatory-digit-signs" },
+  { "~FOFD1340_Picture", "picture" },
+  { "~FOFD1340_Place", "place" },
   { "~FORG0001_BadHexDigit_2", "'$2': invalid hexedecimal digit" },
   { "~FORG0001_Base64BadChar_2", "'$2': invalid Base64 character" },
   { "~FORG0001_Base64Multiple4", "Base64 data must be a multiple of 4 bytes" },

=== modified file 'src/diagnostics/pregenerated/dict_zed_keys.h'
--- src/diagnostics/pregenerated/dict_zed_keys.h	2013-06-18 02:28:10 +0000
+++ src/diagnostics/pregenerated/dict_zed_keys.h	2013-06-18 14:33:55 +0000
@@ -70,19 +70,23 @@
 #define ZED_XQDY0074_NotCastToQName "~XQDY0074_NotCastToQName"
 #define ZED_XQDY0074_NoEmptyLocalname "~XQDY0074_NoEmptyLocalname"
 #define ZED_XQDY0074_NameSapceConstructor "~XQDY0074_NameSapceConstructor"
-#define ZED_FOFD1340_BadCalendar "~FOFD1340_BadCalendar"
-#define ZED_FOFD1340_BadComponent_3 "~FOFD1340_BadComponent_3"
-#define ZED_FOFD1340_Bad2ndModifier_3 "~FOFD1340_Bad2ndModifier_3"
-#define ZED_FOFD1340_Bad2ndModifierHere_3 "~FOFD1340_Bad2ndModifierHere_3"
+#define ZED_FOFD1340_Picture "~FOFD1340_Picture"
+#define ZED_FOFD1340_Language "~FOFD1340_Language"
+#define ZED_FOFD1340_Calendar "~FOFD1340_Calendar"
+#define ZED_FOFD1340_Place "~FOFD1340_Place"
+#define ZED_FOFD1340_BadCalendarDesignator "~FOFD1340_BadCalendarDesignator"
+#define ZED_FOFD1340_BadComponent_4 "~FOFD1340_BadComponent_4"
+#define ZED_FOFD1340_Bad2ndModifier_4 "~FOFD1340_Bad2ndModifier_4"
+#define ZED_FOFD1340_Bad2ndModifierHere_4 "~FOFD1340_Bad2ndModifierHere_4"
 #define ZED_FOFD1340_BadWidthModifier "~FOFD1340_BadWidthModifier"
-#define ZED_FOFD1340_DigitNotSameFamily_34 "~FOFD1340_DigitNotSameFamily_34"
-#define ZED_FOFD1340_Dup2ndModifier_3 "~FOFD1340_Dup2ndModifier_3"
-#define ZED_FOFD1340_MultipleComponent_3 "~FOFD1340_MultipleComponent_3"
+#define ZED_FOFD1340_DigitNotSameFamily_45 "~FOFD1340_DigitNotSameFamily_45"
+#define ZED_FOFD1340_Dup2ndModifier_4 "~FOFD1340_Dup2ndModifier_4"
+#define ZED_FOFD1340_MultipleComponent_4 "~FOFD1340_MultipleComponent_4"
 #define ZED_FOFD1340_MustBeOneMandatoryDigit "~FOFD1340_MustBeOneMandatoryDigit"
 #define ZED_FOFD1340_NoComponent "~FOFD1340_NoComponent"
-#define ZED_FOFD1340_NoAdjacentGroupSep_3 "~FOFD1340_NoAdjacentGroupSep_3"
-#define ZED_FOFD1340_NoGroupSepAtStart_3 "~FOFD1340_NoGroupSepAtStart_3"
-#define ZED_FOFD1340_NoGroupSepAtEnd_3 "~FOFD1340_NoGroupSepAtEnd_3"
+#define ZED_FOFD1340_NoAdjacentGroupSep_4 "~FOFD1340_NoAdjacentGroupSep_4"
+#define ZED_FOFD1340_NoGroupSepAtStart_4 "~FOFD1340_NoGroupSepAtStart_4"
+#define ZED_FOFD1340_NoGroupSepAtEnd_4 "~FOFD1340_NoGroupSepAtEnd_4"
 #define ZED_FOFD1340_NoOptDigitAfterMandatory "~FOFD1340_NoOptDigitAfterMandatory"
 #define ZED_FTST0009_BadStopWordsLang "~FTST0009_BadStopWordsLang"
 #define ZED_FTST0009_BadStemmerLang "~FTST0009_BadStemmerLang"
@@ -216,6 +220,7 @@
 #define ZED_BaseURI "~BaseURI"
 #define ZED_BoxCondTooManyColumns "~BoxCondTooManyColumns"
 #define ZED_CharExpected_3 "~CharExpected_3"
+#define ZED_CharExpected_4 "~CharExpected_4"
 #define ZED_CloneNotImplemented "~CloneNotImplemented"
 #define ZED_ClosingBraceWithoutOpen "~ClosingBraceWithoutOpen"
 #define ZED_CollectionIteratorNotOpen "~CollectionIteratorNotOpen"

=== modified file 'src/runtime/durations_dates_times/format_dateTime.cpp'
--- src/runtime/durations_dates_times/format_dateTime.cpp	2013-06-18 02:28:10 +0000
+++ src/runtime/durations_dates_times/format_dateTime.cpp	2013-06-18 14:33:55 +0000
@@ -654,7 +654,8 @@
       err::FOFD1340,
       ERROR_PARAMS(
         picture_str,
-        ZED( FOFD1340_NoGroupSepAtStart_3 ),
+        ZED( FOFD1340_Picture ),
+        ZED( FOFD1340_NoGroupSepAtStart_4 ),
         unicode::printable_cp( cp )
       ),
       ERROR_LOC( loc )
@@ -695,6 +696,7 @@
             err::FOFD1340,
             ERROR_PARAMS(
               picture_str,
+              ZED( FOFD1340_Picture ),
               ZED( FOFD1340_NoOptDigitAfterMandatory )
             ),
             ERROR_LOC( loc )
@@ -714,7 +716,8 @@
               err::FOFD1340,
               ERROR_PARAMS(
                 picture_str,
-                ZED( FOFD1340_DigitNotSameFamily_34 ),
+                ZED( FOFD1340_Picture ),
+                ZED( FOFD1340_DigitNotSameFamily_45 ),
                 unicode::printable_cp( cp ),
                 unicode::printable_cp( zero[1] )
               ),
@@ -755,7 +758,8 @@
             err::FOFD1340,
             ERROR_PARAMS(
               picture_str,
-              ZED( FOFD1340_NoAdjacentGroupSep_3 ),
+              ZED( FOFD1340_Picture ),
+              ZED( FOFD1340_NoAdjacentGroupSep_4 ),
               unicode::printable_cp( cp )
             ),
             ERROR_LOC( loc )
@@ -777,7 +781,8 @@
         err::FOFD1340,
         ERROR_PARAMS(
           picture_str,
-          ZED( FOFD1340_NoGroupSepAtEnd_3 ),
+          ZED( FOFD1340_Picture ),
+          ZED( FOFD1340_NoGroupSepAtEnd_4 ),
           unicode::printable_cp( cp )
         ),
         ERROR_LOC( loc )
@@ -789,7 +794,11 @@
       //
       throw XQUERY_EXCEPTION(
         err::FOFD1340,
-        ERROR_PARAMS( picture_str, ZED( FOFD1340_MustBeOneMandatoryDigit ) ),
+        ERROR_PARAMS(
+          picture_str,
+          ZED( FOFD1340_Picture ),
+          ZED( FOFD1340_MustBeOneMandatoryDigit )
+        ),
         ERROR_LOC( loc )
       );
     }
@@ -860,7 +869,12 @@
       if ( ++v == u_picture_str.end() )
         throw XQUERY_EXCEPTION(
           err::FOFD1340,
-          ERROR_PARAMS( *u_picture_str.get(), ZED( CharExpected_3 ), ')' ),
+          ERROR_PARAMS(
+            *u_picture_str.get(),
+            ZED( FOFD1340_Picture ),
+            ZED( CharExpected_4 ),
+            ')'
+          ),
           ERROR_LOC( loc )
         );
       unicode::code_point const cp = *v;
@@ -930,7 +944,8 @@
           err::FOFD1340,
           ERROR_PARAMS(
             picture_str,
-            ZED( FOFD1340_Bad2ndModifier_3 ),
+            ZED( FOFD1340_Picture ),
+            ZED( FOFD1340_Bad2ndModifier_4 ),
             unicode::printable_cp( cp )
           ),
           ERROR_LOC( loc )
@@ -945,7 +960,8 @@
     err::FOFD1340,
     ERROR_PARAMS(
       picture_str,
-      ZED( FOFD1340_Bad2ndModifierHere_3 ),
+      ZED( FOFD1340_Picture ),
+      ZED( FOFD1340_Bad2ndModifierHere_4 ),
       unicode::printable_cp( cp )
     )
   );
@@ -955,7 +971,8 @@
     err::FOFD1340,
     ERROR_PARAMS(
       picture_str,
-      ZED( FOFD1340_Dup2ndModifier_3 ),
+      ZED( FOFD1340_Picture ),
+      ZED( FOFD1340_Dup2ndModifier_4 ),
       unicode::printable_cp( cp )
     )
   );
@@ -1012,7 +1029,11 @@
 bad_width_modifier:
   throw XQUERY_EXCEPTION(
     err::FOFD1340,
-    ERROR_PARAMS( picture_str, ZED( FOFD1340_BadWidthModifier ) ),
+    ERROR_PARAMS(
+      picture_str,
+      ZED( FOFD1340_Picture ),
+      ZED( FOFD1340_BadWidthModifier )
+    ),
     ERROR_LOC( loc )
   );
 }
@@ -1089,7 +1110,11 @@
             //
             throw XQUERY_EXCEPTION(
               err::FOFD1340,
-              ERROR_PARAMS( cal_str, ZED( FOFD1340_BadCalendar ) ),
+              ERROR_PARAMS(
+                cal_str,
+                ZED( FOFD1340_Calendar ),
+                ZED( FOFD1340_BadCalendarDesignator )
+              ),
               ERROR_LOC( loc )
             );
           }
@@ -1161,7 +1186,11 @@
           if ( !component )
             throw XQUERY_EXCEPTION(
               err::FOFD1340,
-              ERROR_PARAMS( picture_str, ZED( FOFD1340_NoComponent ) ),
+              ERROR_PARAMS(
+                picture_str,
+                ZED( FOFD1340_Picture ),
+                ZED( FOFD1340_NoComponent )
+              ),
               ERROR_LOC( loc )
             );
           component = 0;
@@ -1189,7 +1218,10 @@
             throw XQUERY_EXCEPTION(
               err::FOFD1340,
               ERROR_PARAMS(
-                picture_str, ZED( FOFD1340_MultipleComponent_3 ), *i
+                picture_str,
+                ZED( FOFD1340_Picture ),
+                ZED( FOFD1340_MultipleComponent_4 ),
+                *i
               ),
               ERROR_LOC( loc )
             );
@@ -1199,7 +1231,12 @@
         default:
           throw XQUERY_EXCEPTION(
             err::FOFD1340,
-            ERROR_PARAMS( picture_str, ZED( FOFD1340_BadComponent_3 ), *i ),
+            ERROR_PARAMS(
+              picture_str,
+              ZED( FOFD1340_Picture ),
+              ZED( FOFD1340_BadComponent_4 ),
+              *i
+            ),
             ERROR_LOC( loc )
           );
       } // switch
@@ -1337,7 +1374,12 @@
     if ( in_variable_marker )
 eos:  throw XQUERY_EXCEPTION(
         err::FOFD1340,
-        ERROR_PARAMS( picture_str, ZED( CharExpected_3 ), ']' ),
+        ERROR_PARAMS(
+          picture_str,
+          ZED( FOFD1340_Picture ),
+          ZED( CharExpected_4 ),
+          ']'
+        ),
         ERROR_LOC( loc )
       );
 

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to