473,404 Members | 2,179 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,404 software developers and data experts.

XSD explaination

Following is a piece of XSD code

<xsd:simpleType name="TimestampType">
<xsd:annotation>
<xsd:documentation>Base type for a date and time stamp</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:dateTime">
<xsd:pattern value="[1-9][0-9]{3}\-.+T[^\.]+(Z|[\+\-].+)"/>
</xsd:restriction>
</xsd:simpleType>



can anyone give a value which satisfies the above xsd or plz explain it???
Mar 10 '08 #1
2 1615
jkmyoung
2,057 Expert 2GB
xs:DateTime

2006-02-15T17:00:00-03:00

The first part is selecting the year:
[1-9][0-9]{3}

Then you have the hyphen
-

Then as many characters as you want until T. Note that since this is a date time, you need it to be in the format MM-DD
where MM is the month and DD is the day.

Next is the T:
T

[^\.]+ match any except periods.

And an optional timezone component, preceded by Z. My example does not have this.

http://www.w3.org/TR/xmlschema-2/#dateTime
Mar 10 '08 #2
Thanks a lot for the reply.

It really worked
Mar 11 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Michael T. Peterson | last post by:
I'm having trouble understanding why fsockopen() returns null yet the errstring/errno value yields: "The operation completed successfully. (0)" Here's the code (modified from an example found...
0
by: baumann | last post by:
hi all, Nontype template parameters are declared much like variables, but they cannot have nontype specifiers like static, mutable, and so forth. They can have const and volatile qualifiers,...
2
by: Steve B. | last post by:
In the following code snipet, what does this code do? Where does it return a bool to... OS? Does it import a User32.dll library? The code is part of creating a singleton instance of an...
2
by: coz | last post by:
I created a wrapper class for a dll written in C. Will the following code prevent the "ENTIRE ARRAY" from being moved, not just the first array element? The Wrapper class will be instantiated in...
3
by: estafford | last post by:
Newbie looking for some insight here. I am writing a block to check limitations on a query string as follows: public bool validNumber(string qstring){ bool isValidNumber; foreach(char c in...
0
by: priya | last post by:
hello, I am new to the window hook development area. I found the following code in a link,i am not able to understand this. Please explain me wat this does. The code has the KeyEventArgs and this...
5
by: Andrew Poulos | last post by:
I tested the JSON parse/to code from json.org and it works but I don't understand how. Could someone explain how something in this format works: (function() {...})(); Andrew Poulos
1
by: mandogon | last post by:
thanks in advance for any help i can get the question is what does this error mean argument of type `char (Camera::)()' does not match `const char*'
0
by: Joe | last post by:
Hi Could someone give me a simple explaination of this XSD which is a DataSet with relations The tables are fgFAT,e0,e1,e2,e3 which I have deleted I am trying to make sense of the part below...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.