473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

XSD/Schema: Who do I set a default for a date-type element?

If I specify a default value in an .xsd-File like this ...

<xs:element name="element1" type="xs:dateTime" minOccurs="0"
default="2004-02-10T00:00:00.0000000+01:00" />

.... and try to build a dataset with xsd /d Dataset.xsd, i receive an
"value doesn't fit the datatype" error.

I tried already formats like "2001-01-01" or "2000/01/01" with the
same result.
Does someone know the right format?

This is my original file:
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="Dataset1"
targetNamespace="http://tempuri.org/Dataset1.xsd"
elementFormDefault="qualified"
attributeFormDefault="qualified"
xmlns="http://tempuri.org/Dataset1.xsd"
xmlns:mstns="http://tempuri.org/Dataset1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="Dataset1" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="element2" type="xs:string" minOccurs="0" />
<xs:element name="element1" type="xs:dateTime" minOccurs="0"
default="2004-02-10T00:00:00.0000000+01:00" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Nov 12 '05 #1
0 2180

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: D. Alvarado | last post by:
Hello, I am sort of new to all this XML, but I would like to enforce a date format within one of my XML elements. Everything I've read indicates that a DTD is not suitable for this purposes, so I...
0
by: Harry Yau | last post by:
Hi all, I am writing a pl/psql function with a temp table right now. It creates the temp table inside. Whenever I call this function in a session for the first time, it creates a shema, namely...
0
by: Harry Yau | last post by:
Hi all, I am writing a pl/psql function with a temp table right now. It creates the temp table inside. Whenever I call this function in a session for the first time, it creates a shema, namely...
7
by: Andrei Ivanov | last post by:
This happend again, but now, postgresql tells me where it happens: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: did not find '}' at end of input node pg_dump: The...
4
by: cmc | last post by:
I need some clarification to help me understand the DB2 strucure more. The questions are about "implicit schema" 1. This is a very interest concpet that DB2 let every user to create new schema...
2
by: Lee Harr | last post by:
I must have a fundamental misunderstanding about using schema. Before using schema, I usually have a file that has my database definition, and I can play that file back in to a new database to...
7
by: greatcanyon | last post by:
Hi, When I create a new user in DB2, can I set the default schema to an existing schema? The reason I want to do this is that I want to later connect to db2 as this user and access tables...
8
by: fireball | last post by:
I wihsh to discuss whether to use fully qualified names: ..object of objects to operate (create, query..) on is good or not? If someone change order of sql code blocks in my script - this may...
2
by: aj | last post by:
SQL Server 2005 64-bit 9.00.3042 SP2 When I map a database user to a login, I can specify a default schema for that user. After that, any SQL from that user w/o an explicit schema will be...
0
by: jrhitokiri | last post by:
QUESTION 1: I'm trying to create a room reservation system for school using wicket and MySQL, and I'm a bit confused with this one. I've already created the user database and rooms database. My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.