using xs:date in Tamino schema

I am having trouble loading data into Tamino after I change an element from xs:string to xs:data

I want to sort on the ‘date’ field

Here is my schema

<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = “” xmlns:tsd = “”>
<tsd:schemaInfo name = “email”>
<tsd:collection name = “stuff”></tsd:collection>
<tsd:doctype name = “email”>
<xs:element name = “email”>
<xs:element ref = “subject”></xs:element>
<xs:element ref = “date”></xs:element>
<xs:element ref = “to”></xs:element>
<xs:element ref = “from”></xs:element>
<xs:element ref = “body”></xs:element>
<xs:element name = “subject” type = “xs:string”></xs:element>
<xs:element name = “date” type = “xs:date” default = “2002-01-01”></xs:element>
<xs:element name = “to” type = “xs:string”></xs:element>
<xs:element name = “from” type = “xs:string”></xs:element>
<xs:element name = “body” type = “xs:string”></xs:element>

I cannot load this document

bye bye

This loads if I change the data type from xs:date
to xs:string

What am I doing wrong?

Jeff M.

Hi Jeff,

I tried this with Tamino and I can successfully define and store the XML document. I must admit I changed the sample document slightly just to include the xml prolog. Which patch level of Tamino do you use and what error do you get? Maybe installing the latest PL will solve this problem.

Kind regards, Stuart

When using Tamino (York) I did not have any problem to store the document using your schema (after adding the XML declaration to the XML instance).
Which error message did you receive when attempting to store the document?

<?xml version="1.0" encoding="iso-8859-1" ?>
document processing started

An invalid value has been found during validation.
Line 4, Column 2: datatype validation for element "date" of type xs:decimal failed:

Hi Jeff
thats indeed the message which I did observe when changing the (valid) date in your sample document. May be there was a bug with validation vs. xs:date in the Newcastle release!?
Best regards

Hi Everyone,

I think that some lateral thought is required here: the error message mentions that the value is invalid for type “xs:decimal” - perhaps the type of “date” has been changed (for experimentation, perhaps) since the posted schema, and the type of date is in fact “xs:decimal” in Jeff’s Tamino.

This would explain the problem, and is worth checking!


This is working great now. My issue is solved!