Cezar Andrei has proposed merging 
lp:~zorba-coders/zorba/bug924756-xsDateTimeStamp into lp:zorba.

Commit message:
Add support for xs:dateTimeStamp XMLSchema 1.1 built-in type.

Requested reviews:
  Cezar Andrei (cezar-andrei)
  Markos Zaharioudakis (markos-za)
Related bugs:
  Bug #924754 in Zorba: "support for the xs:dateTimeStamp type"
  https://bugs.launchpad.net/zorba/+bug/924754

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug924756-xsDateTimeStamp/+merge/149901

Add support for xs:dateTimeStamp XMLSchema 1.1 built-in type.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug924756-xsDateTimeStamp/+merge/149901
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'include/zorba/store_consts.h'
--- include/zorba/store_consts.h	2012-12-05 03:33:46 +0000
+++ include/zorba/store_consts.h	2013-02-21 18:17:25 +0000
@@ -24,7 +24,7 @@
 
 /*******************************************************************************
   !!! ATTENTION: The order of the enum values within SchemaTypeCode is important.
-  !!! DO NOT change this order!!!!
+  !!! DO NOT change this order!!!! DO NOT insert in the middle!!!!
 ********************************************************************************/
 enum SchemaTypeCode
 {
@@ -86,6 +86,7 @@
   XS_NOTATION              = 44,
   
   JS_NULL                  = 45,
+  XS_DATETIME_STAMP        = 46,
 
   XS_LAST
 };

=== modified file 'src/api/store_consts.cpp'
--- src/api/store_consts.cpp	2012-12-12 19:34:45 +0000
+++ src/api/store_consts.cpp	2013-02-21 18:17:25 +0000
@@ -70,6 +70,7 @@
     "xs:QNAME",               // 43
     "xs:NOTATION",            // 44
     "js:null",                // 45
+    "xs:dateTimeStamp",       // 46
   };
 
   if ( c >= 0 && c < XS_LAST )

=== modified file 'src/store/api/item_factory.h'
--- src/store/api/item_factory.h	2013-02-12 04:20:23 +0000
+++ src/store/api/item_factory.h	2013-02-21 18:17:25 +0000
@@ -407,6 +407,50 @@
    * @param xs:time Item (might be NULL)
    */
   virtual bool createDateTime(Item_t& result, const Item_t&, const Item_t&) = 0;
+  
+  
+  virtual bool createDateTimeStamp(
+                              Item_t& result,
+                              const xs_dateTime* value) = 0;
+  
+  virtual bool createDateTimeStamp(
+                              store::Item_t& result,
+                              const xs_date* date,
+                              const xs_time* time) = 0;
+  
+  
+  /**
+   * @param year
+   * @param month
+   * @param day
+   * @param hour
+   * @param minute
+   * @param second
+   * @param timeZone_hours Difference in hours to UTC
+   */
+  virtual bool createDateTimeStamp(
+                              Item_t& result,
+                              short year,
+                              short month,
+                              short day,
+                              short hour,
+                              short minute,
+                              double second,
+                              short timeZone_hours) = 0;
+  
+  /**
+   * Specification: [http://www.w3.org/TR/xmlschema11-2/#dateTimeStamp]
+   * @param value string representation of the value
+   */
+  virtual bool createDateTimeStamp(Item_t& result, const char* str, ulong strlen) = 0;
+  
+  /**
+   * Specification: [http://www.w3.org/TR/xpath-functions/] Section 5.2
+   *
+   * @param xs:date Item (might be NULL)
+   * @param xs:time Item (must not be NULL)
+   */
+  virtual bool createDateTimeStamp(Item_t& result, const Item_t&, const Item_t&) = 0;
 
 
   virtual bool createDate(Item_t& result, const xs_date* value) = 0;

=== modified file 'src/store/naive/simple_item_factory.cpp'
--- src/store/naive/simple_item_factory.cpp	2013-02-18 14:54:25 +0000
+++ src/store/naive/simple_item_factory.cpp	2013-02-21 18:17:25 +0000
@@ -580,6 +580,114 @@
 }
 
 
+bool BasicItemFactory::createDateTimeStamp(store::Item_t& result, const xs_dateTime* value)
+{
+  if( value->hasTimezone() )
+  {
+    result = new DateTimeItem(store::XS_DATETIME, value);
+    return true;
+  }
+  else
+  {
+    result = NULL;
+    return false;
+  }
+}
+  
+  
+bool BasicItemFactory::createDateTimeStamp(
+                                      store::Item_t& result,
+                                      const xs_date* date,
+                                      const xs_time* time)
+{
+  std::auto_ptr<DateTimeItem> dtin(new DateTimeItem(store::XS_DATETIME_STAMP));
+  int err = DateTime::createDateTime(date, time, dtin->theValue);
+  if (err == 0 && time->hasTimezone())
+  {
+    result = dtin.get();
+    dtin.release();
+    return true;
+  }
+  else
+  {
+    result = NULL;
+    return false;
+  }
+}
+  
+  
+bool BasicItemFactory::createDateTimeStamp(
+                                      store::Item_t& result,
+                                      short   year ,
+                                      short   month,
+                                      short   day,
+                                      short   hour,
+                                      short   minute,
+                                      double  second,
+                                      short   timeZone_hours)
+{
+  DateTime dt;
+  TimeZone tz(timeZone_hours);
+    
+  if (DateTime::createDateTime(year, month, day, hour, minute, second, &tz, dt) == 0)
+  {
+    result = new DateTimeItem(store::XS_DATETIME_STAMP, &dt);
+    return true;
+  }
+  else
+  {
+    result = NULL;
+    return false;
+  }
+}
+  
+  
+bool BasicItemFactory::createDateTimeStamp(
+                                      store::Item_t& result,
+                                      const char* str,
+                                      ulong strlen)
+{
+  DateTime dt;
+    
+  if (DateTime::parseDateTime(str, strlen, dt) == 0 && dt.hasTimezone())
+  {
+    result = new DateTimeItem(store::XS_DATETIME_STAMP, &dt);
+    return true;
+  }
+  else
+  {
+    result = NULL;
+    return false;
+  }
+}
+  
+  
+bool BasicItemFactory::createDateTimeStamp(
+                                      store::Item_t& result,
+                                      const store::Item_t& date,
+                                      const store::Item_t& time)
+{
+  if ( time.isNull() )
+  {
+    throw XQUERY_EXCEPTION(err::FORG0001);
+  }
+  else if (date.isNull() || time.isNull())
+  {
+    result = NULL;
+    return false;
+  }
+  else
+  {
+    const xs_date& d = date->getDateValue();
+    const xs_time& t = time->getTimeValue();
+    if (! createDateTimeStamp( result, &d, &t))
+      throw XQUERY_EXCEPTION(err::FORG0008, ERROR_PARAMS(d, t));
+      
+    return true;
+  }
+}
+  
+  
 bool BasicItemFactory::createDate(store::Item_t& result, const xs_date* value)
 {
   result = new DateTimeItem(store::XS_DATE, value);

=== modified file 'src/store/naive/simple_item_factory.h'
--- src/store/naive/simple_item_factory.h	2013-02-12 04:20:23 +0000
+++ src/store/naive/simple_item_factory.h	2013-02-21 18:17:25 +0000
@@ -190,6 +190,16 @@
 
   bool createDateTime(store::Item_t& result, const store::Item_t&, const store::Item_t&);
 
+  bool createDateTimeStamp(store::Item_t& result, const xs_date* date, const xs_time* time);
+  
+  bool createDateTimeStamp(store::Item_t& result, const xs_dateTime* value);
+  
+  bool createDateTimeStamp(store::Item_t& result, short year , short month, short day, short hour, short minute, double second, short timeZone_hours);
+  
+  bool createDateTimeStamp(store::Item_t& result, const char* str, ulong strlen);
+  
+  bool createDateTimeStamp(store::Item_t& result, const store::Item_t&, const store::Item_t&);
+  
   bool createDate(store::Item_t& result, const xs_date* value);
 
   bool createDate(store::Item_t& result, short year, short month, short day);

=== modified file 'src/store/naive/store.cpp'
--- src/store/naive/store.cpp	2013-02-06 20:22:14 +0000
+++ src/store/naive/store.cpp	2013-02-21 18:17:25 +0000
@@ -215,6 +215,7 @@
   theSchemaTypeNames[store::XS_ENTITY] = theQNamePool->insert(ns, "xs", "ENTITY");
 
   theSchemaTypeNames[store::XS_DATETIME] = theQNamePool->insert(ns, "xs", "dateTime");
+  theSchemaTypeNames[store::XS_DATETIME_STAMP] = theQNamePool->insert(ns, "xs", "dateTimeStamp");
   theSchemaTypeNames[store::XS_DATE] = theQNamePool->insert(ns, "xs", "date");
   theSchemaTypeNames[store::XS_TIME] = theQNamePool->insert(ns, "xs", "time");
   theSchemaTypeNames[store::XS_GYEAR_MONTH] = theQNamePool->insert(ns, "xs", "gYearMonth");

=== modified file 'src/types/casting.cpp'
--- src/types/casting.cpp	2013-01-22 11:07:53 +0000
+++ src/types/casting.cpp	2013-02-21 18:17:25 +0000
@@ -224,6 +224,7 @@
 SAME_S_AND_T(NOT)
 SAME_S_AND_T(NUL)
 SAME_S_AND_T(uint)
+SAME_S_AND_T(dTSt)
 
 #undef SAME_S_AND_T
 
@@ -389,6 +390,20 @@
 }
 
 
+T1_TO_T2(str, dTSt)
+{
+  xs_dateTime dt;
+  if (0 == DateTime::parseDateTime(strval.c_str(), strval.size(), dt) &&
+      dt.hasTimezone() )
+  {
+    aFactory->createDateTimeStamp(result, &dt);
+    return;
+  }
+    
+  throwFORG0001Exception(strval, errInfo);
+}
+  
+  
 T1_TO_T2(str, tim)
 {
   xs_time t;
@@ -725,6 +740,14 @@
 }
 
 
+T1_TO_T2(uA, dTSt)
+{
+  zstring strval2;
+  aItem->getStringValue2(strval2);
+  str_dTSt(result, aItem, strval2, aFactory, nsCtx, errInfo);
+}
+  
+  
 T1_TO_T2(uA, tim)
 {
   zstring strval2;
@@ -1191,6 +1214,14 @@
 }
 
 
+T1_TO_T2(dT, dTSt)
+{
+  DateTime dt;
+  dt = aItem->getDateTimeValue(); //.createWithNewFacet(DateTime::DATETIME_FACET, dt);
+  aFactory->createDateTimeStamp(result, &dt);
+}
+  
+  
 T1_TO_T2(dat, gYM)
 {
   DateTime dt;
@@ -1883,7 +1914,7 @@
 
 /*******************************************************************************
   For each builtin atomic type T, this array maps the typecode of T to an
-  index to be used in addessing theCastingMatrix.
+  index to be used in addessing theCastMatrix.
 ********************************************************************************/
 const int GenericCast::theMapping[store::XS_LAST] =
 {
@@ -1932,14 +1963,15 @@
   20,  // 42 XS_ANY_URI
   21,  // 43 XS_QNAME
   22,  // 44 XS_NOTATION
-  23   // 45 JS_NULL
+  23,  // 45 JS_NULL
+  25,  // 46 XS_DATETIME_STAMP
 };
 
 
 /*******************************************************************************
 
 ********************************************************************************/
-const GenericCast::DownCastFunc GenericCast::theDownCastMatrix[25] =
+const GenericCast::DownCastFunc GenericCast::theDownCastMatrix[26] =
 {
 /*uA*/    0,
 /*str*/   str_down,
@@ -1965,144 +1997,150 @@
 /*QN*/    0,
 /*NOT*/   0,
 /*uint*/  int_down,
-/*null*/  0
+/*null*/  0,
+/*dtSt*/  0,
 };
 
 
 /*******************************************************************************
 
 ********************************************************************************/
-const GenericCast::CastFunc GenericCast::theCastMatrix[25][25] =
+const GenericCast::CastFunc GenericCast::theCastMatrix[26][26] =
 {
 // uA        str        flt       dbl         dec        int       dur       yMD
 // dTD       dT         tim       dat         gYM        gYr       gMD       gDay 
 // gMon      bool       b64       hxB         aURI       QN        NOT       uint
-// null
+// null      dTSt
 
 {&uA_uA,    &uA_str,   &uA_flt,  &uA_dbl ,   &uA_dec ,  &uA_int,   &uA_dur,  &uA_yMD,
  &uA_dTD,   &uA_dT,    &uA_tim,  &uA_dat,    &uA_gYM ,  &uA_gYr ,  &uA_gMD,  &uA_gDay,
- &uA_gMon, &uA_bool,   &uA_b64,  &uA_hxB,    &uA_aURI,  0,         0,        &uA_uint,
- 0}, // uA
+ &uA_gMon,  &uA_bool,  &uA_b64,  &uA_hxB,    &uA_aURI,  0,         0,        &uA_uint,
+ 0,         &uA_dTSt}, // uA
 
 {&str_uA,   &str_str,  &str_flt,  &str_dbl,  &str_dec,  &str_int,  &str_dur, &str_yMD,
  &str_dTD,  &str_dT,   &str_tim,  &str_dat,  &str_gYM,  &str_gYr,  &str_gMD, &str_gDay,
  &str_gMon, &str_bool, &str_b64,  &str_hxB,  &str_aURI, &str_QN,   &str_NOT, &str_uint,
- 0}, // str
+ 0,         &str_dTSt}, // str
 
 {&flt_uA,   &flt_str,  &flt_flt,  &flt_dbl,  &flt_dec,  &flt_int,  0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,
  0,         &flt_bool, 0,         0,         0,         0,         0,        &flt_uint,
- 0}, // flt
+ 0,         0}, // flt
 
 {&dbl_uA,   &dbl_str,  &dbl_flt,  &dbl_dbl,  &dbl_dec,  &dbl_int,  0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,  
  0,         &dbl_bool, 0,         0,         0,         0,         0,        &dbl_uint,
- 0}, // dbl
+ 0,         0}, // dbl
 
 {&dec_uA,   &dec_str,  &dec_flt,  &dec_dbl,  &dec_dec,  &dec_int,  0,        0,
  0,         0,         0,         0,         0,         0,         0,        0, 
  0,         &dec_bool, 0,         0,         0,         0,         0,        &dec_uint,
- 0}, // dec
+ 0,         0}, // dec
 
 {&int_uA,   &int_str,  &int_flt,  &int_dbl,  &int_dec,  &int_int,  0,        0, 
  0,         0,         0,         0,         0,         0,         0,        0, 
  0,         &int_bool, 0,         0,         0,         0,         0,        &int_uint,
- 0}, // int
+ 0,         0}, // int
 
 {&dur_uA,   &dur_str,  0,         0,         0,         0,         &dur_dur, &dur_yMD,
  &dur_dTD,  0,         0,         0,         0,         0,         0,        0, 
  0,         0,         0,         0,         0,         0,         0,        0,
- 0}, // dur
+ 0,         0}, // dur
 
 {&yMD_uA,   &yMD_str,  0,         0,         0,         0,         &yMD_dur, &yMD_yMD,
  &yMD_dTD,  0,         0,         0,         0,         0,         0,        0, 
  0,         0,         0,         0,         0,         0,         0,        0,
- 0}, // yMD
+ 0,         0}, // yMD
 
 {&dTD_uA,   &dTD_str,  0,         0,         0,         0,         &dTD_dur, &dTD_yMD,
  &dTD_dTD,  0,         0,         0,         0,         0,         0,        0,  
  0,         0,         0,         0,         0,         0,         0,        0,
- 0}, // dTD
+ 0,         0}, // dTD
 
 {&dT_uA,    &dT_str,   0,         0,         0,         0,         0,        0,
  0,         &dT_dT,    &dT_tim,   &dT_dat,   &dT_gYM,   &dT_gYr,   &dT_gMD,  &dT_gDay,
  &dT_gMon,  0,         0,         0,         0,         0,         0,        0,
- 0}, // dT
+ 0,         &dT_dTSt}, // dT
 
 {&tim_uA,   &tim_str,  0,         0,         0,         0,         0,        0,
  0,         0,         &tim_tim,  0,         0,         0,         0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,
- 0}, // tim
+ 0,         0}, // tim
 
 {&dat_uA,   &dat_str,  0,         0,         0,         0,         0,        0,
  0,         &dat_dT,   0,         &dat_dat,  &dat_gYM,  &dat_gYr,  &dat_gMD, &dat_gDay,
  &dat_gMon, 0,         0,         0,         0,         0,         0,        0,
- 0}, // dat
+ 0,         0}, // dat
 
 {&gYM_uA,   &gYM_str,  0,         0,         0,         0,         0,        0, 
  0,         0,         0,         0,         &gYM_gYM,  0,         0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,
- 0}, // gYM
+ 0,         0}, // gYM
 
 {&gYr_uA,   &gYr_str,  0,         0,         0,         0,         0,        0,
  0,         0,         0,         0,         0,         &gYr_gYr,  0,        0,  
  0,         0,         0,         0,         0,         0,         0,        0,
- 0}, // gYr
+ 0,         0}, // gYr
 
 {&gMD_uA,   &gMD_str,  0,         0,         0,         0,         0,        0, 
  0,         0,         0,         0,         0,         0,         &gMD_gMD, 0,
  0,         0,         0,         0,         0,         0,         0,        0,
- 0}, // gMD
+ 0,         0}, // gMD
 
 {&gDay_uA,  &gDay_str, 0,         0,         0,         0,         0,        0, 
  0,         0,         0,         0,         0,         0,         0,        &gDay_gDay,
  0,         0,         0,         0,         0,         0,         0,        0,
- 0}, // gDay
+ 0,         0}, // gDay
 
 {&gMon_uA,  &gMon_str, 0,         0,         0,         0,         0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,  
  &gMon_gMon,0,         0,         0,         0,         0,         0,        0,
- 0}, // gMon
+ 0,         0}, // gMon
 
 {&bool_uA,  &bool_str, &bool_flt, &bool_dbl, &bool_dec, &bool_int, 0,        0, 
  0,         0,         0,         0,         0,         0,         0,        0,  
  0,         &bool_bool,0,         0,         0,         0,         0,        &bool_uint,
- 0}, // bool
+ 0,         0}, // bool
 
 {&b64_uA,   &b64_str,  0,         0,         0,         0,         0,        0, 
  0,         0,         0,         0,         0,         0,         0,        0,
  0,         0,         &b64_b64,  &b64_hxB,  0,         0,         0,        0,
- 0}, // b64
+ 0,         0}, // b64
 
 {&hxB_uA,   &hxB_str,  0,         0,         0,         0,         0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,
  0,         0,         &hxB_b64,  &hxB_hxB,  0,         0,         0,        0,
- 0}, // hxB
+ 0,         0}, // hxB
 
 {&aURI_uA,  &aURI_str, 0,         0,         0,         0,         0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,  
  0,         0,         0,         0,         &aURI_aURI,0,         0,        0,
- 0}, // aURI
+ 0,         0}, // aURI
 
 {&QN_uA,    &QN_str,   0,         0,         0,         0,         0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,
  0,         0,         0,         0,         0,         &QN_QN,    0,        0,
- 0}, // QN
+ 0,         0}, // QN
 
 {&NOT_uA,   &NOT_str,  0,         0,         0,         0,         0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,
  0,         0,         0,         0,         0,         0,         &NOT_NOT, 0,
- 0}, // NOT
+ 0,         0}, // NOT
 
 {&uint_uA,  &uint_str, &uint_flt, &uint_dbl, &uint_dec, &uint_int, 0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,
  0,         &uint_bool,0,         0,         0,         0,         0,        &uint_uint,
- 0},
+ 0,         0},
 
 {0,         &NUL_str,  0,         0,         0,         0,         0,        0,
  0,         0,         0,         0,         0,         0,         0,        0,  
  0,         0,         0,         0,         0,         0,         0,        0,
- &NUL_NUL} // NUL
+ &NUL_NUL,  0}, // Nul
+
+{&dT_uA,    &dT_str,   0,         0,         0,         0,         0,        0,
+ 0,         &dT_dTSt,    &dT_tim,   &dT_dat,   &dT_gYM,   &dT_gYr,   &dT_gMD,  &dT_gDay,
+ &dT_gMon,  0,         0,         0,         0,         0,         0,        0,
+ 0,         &dTSt_dTSt}, // dTS
 };
 
 

=== modified file 'src/types/casting.h'
--- src/types/casting.h	2013-01-10 13:14:51 +0000
+++ src/types/casting.h	2013-02-21 18:17:25 +0000
@@ -50,8 +50,8 @@
  
 private:
   static const int          theMapping[store::XS_LAST];
-  static const CastFunc     theCastMatrix[25][25];
-  static const DownCastFunc theDownCastMatrix[25];
+  static const CastFunc     theCastMatrix[26][26];
+  static const DownCastFunc theDownCastMatrix[26];
 
   GenericCast() {}
     

=== modified file 'src/types/root_typemanager.cpp'
--- src/types/root_typemanager.cpp	2013-01-08 12:59:48 +0000
+++ src/types/root_typemanager.cpp	2013-02-21 18:17:25 +0000
@@ -46,53 +46,54 @@
 const TypeConstants::castable_t 
 RootTypeManager::ATOMIC_CAST_MATRIX[store::XS_LAST][store::XS_LAST] = 
 {
-// aA s  nS t  l  NM Na NC ID IR EN uA dT d  t  d  yM dT f  do de i  nP nI l  i  s  b  nn uL uI uS uB pI YM Y  MD D  M  b  64 hB aU QN NO nu
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* anyAtomicType */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* string */
-  {Y, Y, Y, M, M, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* normalizedString */
-  {Y, Y, Y, Y, M, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* token */
-  {Y, Y, Y, Y, Y, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* language */
-  {Y, Y, Y, Y, M, Y, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* NMTOKEM */
-  {Y, Y, Y, Y, M, M, Y, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* Name */
-  {Y, Y, Y, Y, M, M, Y, Y, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* NCMame */
-  {Y, Y, Y, Y, M, M, Y, Y, Y, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* ID */
-  {Y, Y, Y, Y, M, M, Y, Y, M, Y, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* IDREF */
-  {Y, Y, Y, Y, M, M, Y, Y, M, M, Y, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N}, /* ENTITY */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N, N}, /* untypedAtomic */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, Y, Y, Y, Y, N, N, N, N, N, N, N}, /* dateTime */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, Y, Y, Y, Y, N, N, N, N, N, N, N}, /* date */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N}, /* time */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N}, /* duration */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N}, /* yearMonthDuration */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N}, /* dayTimeDuration */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* float */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* double */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* decimal */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, M, M, M, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* integer */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, Y, M, M, M, M, M, M, M, M, M, M, N, N, N, N, N, N, Y, N, N, N, N, N, N}, /* nonPositiveInteger */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, Y, Y, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N}, /* negativeInteger */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, M, Y, M, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* long */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, M, Y, Y, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* int */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, M, Y, Y, Y, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* short */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, M, Y, Y, Y, Y, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* byte */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, N, M, M, M, M, Y, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* nonNegativeInteger */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, N, M, M, M, M, Y, Y, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* unsignedLong */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, N, Y, M, M, M, Y, Y, Y, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* unsignedInt */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, N, Y, Y, M, M, Y, Y, Y, Y, M, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* unsignedShort */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, N, Y, Y, Y, M, Y, Y, Y, Y, Y, M, N, N, N, N, N, Y, N, N, N, N, N, N}, /* unsignedByte */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, N, N, M, M, M, M, M, Y, Y, Y, Y, Y, N, N, N, N, N, Y, N, N, N, N, N, N}, /* positiveInteger */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N, N, N, N, N}, /* gYearMonth */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N, N, N, N}, /* gYear */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N, N, N}, /* gMonthDay */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N, N}, /* gDay */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* gMonth */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, N, N, N, N, N, Y, N, N, N, N, N, N}, /* boolean */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, Y, N, N, N, N}, /* base64Binary */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, Y, N, N, N, N}, /* hexBinary */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N}, /* anyURI */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N}, /* QName */
-  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, M, N}, /* NOTATION */
-  {N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y}, /* null */
+// aA s  nS t  l  NM Na NC ID IR EN uA dT d  t  d  yM dT f  do de i  nP nI l  i  s  b  nn uL uI uS uB pI YM Y  MD D  M  b  64 hB aU QN NO nu dTS
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* anyAtomicType */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* string */
+  {Y, Y, Y, M, M, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* normalizedString */
+  {Y, Y, Y, Y, M, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* token */
+  {Y, Y, Y, Y, Y, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* language */
+  {Y, Y, Y, Y, M, Y, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* NMTOKEM */
+  {Y, Y, Y, Y, M, M, Y, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* Name */
+  {Y, Y, Y, Y, M, M, Y, Y, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* NCMame */
+  {Y, Y, Y, Y, M, M, Y, Y, Y, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* ID */
+  {Y, Y, Y, Y, M, M, Y, Y, M, Y, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* IDREF */
+  {Y, Y, Y, Y, M, M, Y, Y, M, M, Y, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N}, /* ENTITY */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N, N, N}, /* untypedAtomic */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, Y, Y, Y, Y, N, N, N, N, N, N, N, N}, /* dateTime */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, Y, Y, Y, Y, N, N, N, N, N, N, N, N}, /* date */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N}, /* time */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N}, /* duration */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N}, /* yearMonthDuration */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N}, /* dayTimeDuration */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* float */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* double */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, M, M, M, M, M, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* decimal */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, M, M, M, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* integer */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, Y, M, M, M, M, M, M, M, M, M, M, N, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* nonPositiveInteger */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, Y, Y, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* negativeInteger */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, M, Y, M, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* long */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, M, Y, Y, M, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* int */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, M, Y, Y, Y, M, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* short */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, M, Y, Y, Y, Y, M, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* byte */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, N, M, M, M, M, Y, M, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* nonNegativeInteger */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, N, M, M, M, M, Y, Y, M, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* unsignedLong */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, N, Y, M, M, M, Y, Y, Y, M, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* unsignedInt */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, N, Y, Y, M, M, Y, Y, Y, Y, M, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* unsignedShort */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, M, N, Y, Y, Y, M, Y, Y, Y, Y, Y, M, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* unsignedByte */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, N, N, M, M, M, M, M, Y, Y, Y, Y, Y, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* positiveInteger */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N, N, N, N, N, N}, /* gYearMonth */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N, N, N, N, N}, /* gYear */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N, N, N, N}, /* gMonthDay */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N, N, N}, /* gDay */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N, N, N, N, N}, /* gMonth */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, N, N, N, N, N, Y, N, N, N, N, N, N, N}, /* boolean */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, Y, N, N, N, N, N}, /* base64Binary */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, Y, N, N, N, N, N}, /* hexBinary */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N, N}, /* anyURI */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N, N, N}, /* QName */
+  {Y, Y, M, M, M, M, M, M, M, M, M, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, M, N, N}, /* NOTATION */
+  {N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, N}, /* null */
+  {Y, Y, N, N, N, N, N, N, N, N, N, Y, Y, Y, Y, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, Y, Y, Y, Y, Y, N, N, N, N, N, N, N, Y}, /* dateTimeStamp */
 };
 
 #undef MAYBE_CASTABLE
@@ -104,52 +105,53 @@
 
 const bool RootTypeManager::ATOMIC_SUBTYPE_MATRIX[store::XS_LAST][store::XS_LAST] = 
 {
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* anyAtomicType */
-  {T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* string */
-  {T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* normalizedString */
-  {T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* token */
-  {T, T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* language */
-  {T, T, T, T, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* NMTOKEN */
-  {T, T, T, T, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* Name */
-  {T, T, T, T, F, F, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* NCName */
-  {T, T, T, T, F, F, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* ID */
-  {T, T, T, T, F, F, T, T, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* IDREF */
-  {T, T, T, T, F, F, T, T, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* ENTITY */
-  {T, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* untypedAtomic */
-  {T, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* dateTime */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* date */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* time */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* duration */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* yearMonthDuration */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* dayTimeDuration */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* float */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* double */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* decimal */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* integer */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* nonPositiveInteger */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* negativeInteger */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* long */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* int */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* short */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* byte */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* nonNegativeInteger */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* unsignedLong */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* unsignedInt */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* unsignedShort */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* unsignedByte */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F}, /* positiveInteger */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F}, /* gYearMonth */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F}, /* gYear */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F}, /* gMonthDay */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F}, /* gDay */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F}, /* gMonth */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F}, /* boolean */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F}, /* base64Binary */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F}, /* hexBinary */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F}, /* anyURI */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F}, /* QName */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F}, /* NOTATION */
-  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T}, /* jdm::null */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* anyAtomicType */
+  {T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* string */
+  {T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* normalizedString */
+  {T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* token */
+  {T, T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* language */
+  {T, T, T, T, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* NMTOKEN */
+  {T, T, T, T, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* Name */
+  {T, T, T, T, F, F, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* NCName */
+  {T, T, T, T, F, F, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* ID */
+  {T, T, T, T, F, F, T, T, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* IDREF */
+  {T, T, T, T, F, F, T, T, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* ENTITY */
+  {T, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* untypedAtomic */
+  {T, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* dateTime */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* date */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* time */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* duration */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* yearMonthDuration */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* dayTimeDuration */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* float */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* double */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* decimal */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* integer */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* nonPositiveInteger */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* negativeInteger */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* long */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* int */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* short */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* byte */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* nonNegativeInteger */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* unsignedLong */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* unsignedInt */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* unsignedShort */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, T, T, T, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* unsignedByte */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, T, F, F, F, F, F, F, T, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F}, /* positiveInteger */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F}, /* gYearMonth */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F}, /* gYear */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F}, /* gMonthDay */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F}, /* gDay */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F}, /* gMonth */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F}, /* boolean */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F}, /* base64Binary */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F}, /* hexBinary */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F}, /* anyURI */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F}, /* QName */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F, F}, /* NOTATION */
+  {T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T, F}, /* jdm::null */
+  {T, F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F, T}, /* dateTimeStamp */
 };
 
 
@@ -246,6 +248,7 @@
   XSQNDECL(XS_ENTITY_QNAME, "ENTITY");
   XSQNDECL(XS_UNTYPED_ATOMIC_QNAME, "untypedAtomic");
   XSQNDECL(XS_DATETIME_QNAME, "dateTime");
+  XSQNDECL(XS_DATETIME_STAMP_QNAME, "dateTimeStamp");
   XSQNDECL(XS_DATE_QNAME, "date");
   XSQNDECL(XS_TIME_QNAME, "time");
   XSQNDECL(XS_DURATION_QNAME, "duration");
@@ -347,6 +350,7 @@
   ATOMIC_TYPE_DEFN(ENTITY)
   ATOMIC_TYPE_DEFN(UNTYPED_ATOMIC)
   ATOMIC_TYPE_DEFN(DATETIME)
+  ATOMIC_TYPE_DEFN(DATETIME_STAMP)
   ATOMIC_TYPE_DEFN(DATE)
   ATOMIC_TYPE_DEFN(TIME)
   ATOMIC_TYPE_DEFN(DURATION)
@@ -633,6 +637,7 @@
   DELETE_TYPE(TIME)
   DELETE_TYPE(DATE)
   DELETE_TYPE(DATETIME)
+  DELETE_TYPE(DATETIME_STAMP)
   DELETE_TYPE(UNTYPED_ATOMIC)
   DELETE_TYPE(ENTITY)
   DELETE_TYPE(IDREF)

=== modified file 'src/types/root_typemanager.h'
--- src/types/root_typemanager.h	2012-12-21 05:11:32 +0000
+++ src/types/root_typemanager.h	2013-02-21 18:17:25 +0000
@@ -92,6 +92,7 @@
   ATOMIC_DECL(IDREF)                  // derived
   ATOMIC_DECL(ENTITY)                 // derived
   ATOMIC_DECL(DATETIME)
+  ATOMIC_DECL(DATETIME_STAMP)         // derived
   ATOMIC_DECL(DATE)
   ATOMIC_DECL(TIME)
   ATOMIC_DECL(DURATION)

=== modified file 'src/types/schema/schema.cpp'
--- src/types/schema/schema.cpp	2013-02-08 01:58:24 +0000
+++ src/types/schema/schema.cpp	2013-02-21 18:17:25 +0000
@@ -1274,7 +1274,18 @@
   {
     result = GENV_TYPESYSTEM.LANGUAGE_TYPE_ONE;
   }
-  // YearMonthDuration and DayTimeDuration are not in schema spec
+  else if ( XMLString::equals(XMLChArray("dayTimeDuration").get (), local) )
+  {
+    result = GENV_TYPESYSTEM.DT_DURATION_TYPE_ONE;
+  }
+  else if ( XMLString::equals(XMLChArray("yearMonthDuration").get (), local) )
+  {
+    result = GENV_TYPESYSTEM.YM_DURATION_TYPE_ONE;
+  }
+  else if ( XMLString::equals(XMLChArray("dateTimeStamp").get (), local) )
+  {
+    result = GENV_TYPESYSTEM.DATETIME_STAMP_TYPE_ONE;
+  }
   else
   {
     // type not covered

=== modified file 'src/types/typeimpl.cpp'
--- src/types/typeimpl.cpp	2013-01-29 06:01:31 +0000
+++ src/types/typeimpl.cpp	2013-02-21 18:17:25 +0000
@@ -140,7 +140,8 @@
   "xs:anyURI",
   "xs:QName",
   "xs:NOTATION",
-  "jdm:null"
+  "jdm:null",
+  "xs:dateTimeStamp"
 };
 
 

=== modified file 'src/zorbatypes/datetime.h'
--- src/zorbatypes/datetime.h	2012-11-17 01:08:54 +0000
+++ src/zorbatypes/datetime.h	2013-02-21 18:17:25 +0000
@@ -317,6 +317,8 @@
       
   TimeZone getTimezone() const;
 
+  bool hasTimezone() const;
+
   /**
    *  Returns -1 if the DateTime is less than the given DateTime
    *  Returns 0 if the DateTimes are equal

=== modified file 'src/zorbatypes/datetime/datetimetype.cpp'
--- src/zorbatypes/datetime/datetimetype.cpp	2012-11-17 01:08:54 +0000
+++ src/zorbatypes/datetime/datetimetype.cpp	2013-02-21 18:17:25 +0000
@@ -997,6 +997,12 @@
 }
 
 
+bool DateTime::hasTimezone() const
+{
+  return !the_time_zone.timeZoneNotSet();
+}
+  
+  
 int DateTime::compare(const DateTime* dt, long timezone_seconds) const
 {
   std::auto_ptr<DateTime> d1_t;

-- 
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