title: Error when selecting timestamp from XMLType column in Oracle 11g
body: <p>I have 2 Oracle 11g databases with a table containing a XMLType column and some test data differing only in the separator (.,) for the milliseconds of the timestamp:</p>
  
  <pre><code>create table TEST_TIMESTAMP (
    ID  number(19,0) constraint "NN_TEST_TIMESTAMP_ID" not null,
    DOC xmltype      constraint "NN_TEST_TIMESTAMP_DOC" not null
  );
  
  insert into TEST_TIMESTAMP values ( 1, xmltype('&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;test&gt;&lt;ts&gt;2015-04-08T04:55:33.11&lt;/ts&gt;&lt;/test&gt;'));
  insert into TEST_TIMESTAMP values ( 2, xmltype('&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;test&gt;&lt;ts&gt;2015-04-08T04:55:33,11&lt;/ts&gt;&lt;/test&gt;'));
  </code></pre>
  
  <p>When I try to extract the timestamp with the following statements, it fails either with the first document on one database or with the second document on the other database.</p>
  
  <pre><code>select x.*
  from TEST_TIMESTAMP t,
       xmltable( 
       '/test'
       passing t.DOC
       columns
         ORIGINAL varchar2(50) path 'ts',
         RESULT timestamp with time zone path 'ts'
   ) x
   where t.ID = 1;
  
   select x.*
   from TEST_TIMESTAMP t,
   xmltable( 
        '/test'
        passing t.DOC
        columns
          ORIGINAL varchar2(50) path 'ts',
          RESULT timestamp with time zone path 'ts'
   ) x
   where t.ID = 2;
  </code></pre>
  
  <p>The error I get:</p>
  
  <pre><code>ORA-01858: a non-numeric character was found where a numeric was expected
  01858. 00000 - "a non-numeric character was found where a numeric was expected"
  *Cause: The input data to be converted using a date format model was
          incorrect.  The input data did not contain a number where a number was
          required by the format model.
  *Action:   Fix the input data or the date format model to make sure the
             elements match in number and type.  Then retry the operation.
  </code></pre>
  
  <p>The only differences between those databases I've found are:</p>
  
  <ul>
  <li>DB1: version=11.2.0.1.0, NLS_CHARACTERSET=AL32UTF8    -> fails on document 2</li>
  <li>DB2: version=11.2.0.2.0, NLS_CHARACTERSET=WE8MSWIN1252 -> fails on document 1</li>
  </ul>
  
  <p>DB1 has the behaviour that I would expect. Does anybody know why those databases behave differently and how to fix the issue in DB2?</p>
  
  <p>Thanks in advance,
  Oliver</p>