473,809 Members | 2,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

limit date with XML Schema

Hi, I want to limit a date to a minDate and a maxDate -
is that possible, and how?

<xs:simpleTyp e>
<xs:restricti on base="xs:date">
<xs:
</xs:restriction>
</xs:simpleType>

I assume it is only possible with "pattern".
Cheers,

Stefan
Jan 6 '06 #1
1 1260
Hi,

You can use min/maxInclusive or min/maxExclusive, as in:

<xs:simpleTyp e>
<xs:restricti on base="xs:date">
<xs:minInclusiv e value="2005-12-15"/>
<xs:maxInclusiv e value="2006-12-15"/>
</xs:restriction>
</xs:simpleType>

Hope that helps,
Priscilla

------------------------------------------------------------------
Priscilla Walmsley
Author, Definitive XML Schema / XML in Office 2003
Definitiv XQuery coming in 2006
http://www.datypic.com
------------------------------------------------------------------

"Stefan Reiter" <Do************ ***@gmx.de> wrote in message
news:43******** *************** @newsread2.arco r-online.net...
Hi, I want to limit a date to a minDate and a maxDate -
is that possible, and how?

<xs:simpleTyp e>
<xs:restricti on base="xs:date">
<xs:
</xs:restriction>
</xs:simpleType>

I assume it is only possible with "pattern".
Cheers,

Stefan

Jan 7 '06 #2

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

Similar topics

5
2114
by: Jeremy | last post by:
I am relatively inexperienced with SQL, and I am trying to learn how to analyze some data with it. I have a table with the following information. COMPANY ID , DATE, MarektValue I would like to select the largest 100 marketvalues for each date in my table. How can I do this efficiently in MySql.
0
1669
by: Binesh Bannerjee | last post by:
Hi... I've asked before about making an element in a schema be able to use xhtml... I've attached my schema definition below... What I'm curious about, is whether there's a means to add a length restriction to the memo field in there... I want to restrict it to say 200 bytes, including tags and all... Is that possible? Something like the way I can do this for a string field? <xsd:simpleType name="fifteen"> <xsd:restriction...
4
350
by: Robert Scarborough | last post by:
I have a Table in a Typed Dataset which contains a Date field called EventDate. I've ensured that the field is defined as Date as opposed to DateTime in the Typed Dataset. When I generate an xml file from an instance of this typed dataset using the ds.WriteXml method, all the dates come out formatted as follows: <EventDate>2004-01-26T00:00:00.0000000-05:00</EventDate>
2
1904
by: David Slinn | last post by:
I have created a simple XML document, generated a schema from it (which Visual Studio makes everything a string element). I then went through and changed all fields that are dates to the Date data type. Now, when I use the datagrid to edit the data in the XML file and then switch back to the raw XML text date, the dates are formatted like this "1973-10-27T00:00:00.0000000-06:00" and not as I expected, which are supposed to be a simple...
14
4361
by: Alan | last post by:
Hi everyone! I'm trying to produce a periodic financial report on projects from various departments. My database is set up with the tables tblDepartment, tblProjects, tblPeriods, and tblBudgets -- the first three serve the obvious function; the last table contains foreign keys to tblProjects and tblPeriods, each record corresponding to a project's budget for a particular period. Periods are also grouped by years (a seperate field for...
1
1504
by: Stefan Reiter | last post by:
Hi, I want to limit a date to a minDate and a maxDate - is that possible, and how? <xs:simpleType> <xs:restriction base="xs:date"> <xs: </xs:restriction> </xs:simpleType> I assume it is only possible with "pattern".
2
1896
by: mrc-1 | last post by:
Hi, i'd like to validate my XML file (see below) using XML Schema. Now my question: is it possible to limit the occurrence of the element b in the data element. I mean: data can contain up to 10 b elements, but it doesn't matter how the b elements are allocated in the elements a and c. Any help would be appreciated -- thank you!
11
9703
by: Israel | last post by:
I've trying to write a query that seems like it should be simple but for some reason my attempts are not working. This is really a general SQL quesion and doesn't pertain to MySQL but I couldn't find a generic database discussion group except on on advancement and theory and this is really a basic query construction question. Just say I have a table with three columns, name, date, score and these represent the test scores for various...
0
2267
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 question is how do I create a schema that accepts both repeating and non-repeating schedules? example (repeating): I can reserve a room for class at 9:00am - 12:00pm every Monday and Thursday, from June - October of 2009. How do I represent this in...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10635
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10378
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9198
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.