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 = “XML Schema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
xs:annotation
xs:appinfo
<tsd:schemaInfo name = “email”>
<tsd:collection name = “stuff”></tsd:collection>
<tsd:doctype name = “email”>
tsd:logical
tsd:contentclosed</tsd:content>
</tsd:logical>
</tsd:doctype>
</tsd:schemaInfo>
</xs:appinfo>
</xs:annotation>
<xs:element name = “email”>
xs:complexType
xs:sequence
<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:sequence>
</xs:complexType>
</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>
</xs:schema>

I cannot load this document

hello
2002-05-06
joe@softwareag.com
michael
bye bye


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

What am I doing wrong?

Thanks,
Jeff M.

Hi Jeff,

I tried this with Tamino 3.1.1.4 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 3.1.1.4 (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
Uli

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!

Cheers,
Trevor.

This is working great now. My issue is solved!