473,480 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

xs:gMonth build in data-type

Hi there,

Am I correct when I say that "--12" is a valid value for an xs:gMonth
data-type in a schema but "12" is not?

Similarly for an xs:gDay, "---30" is a valid value but "30" is not?

This seems bizarre. Is there a more suitable datatype for representing
days, months etc? I hoped I would be able to, in my schema do something
like:

<xs:element name="DAY" type="xs:gDay"/>
<xs:element name="MONTH" type="xs:gMonth"/>

and the following would be valid:

<DAY>30</DAY>
<MONTH>12</MONTH>

I have read http://www.w3.org/TR/xmlschema-2/#built-in-datatypes and it
does state, for example:

"The lexical representation for gDay is the left truncated lexical
representation for date: ---DD".

This seems counterintuitive (to the layman at least)

Lord0

Oct 20 '06 #1
2 3128
Lord0 wrote:
This seems bizarre. Is there a more suitable datatype for representing
days, months etc?
Integer, limited to appropriate 1-to-whatever range?

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Oct 20 '06 #2
Integer, limited to appropriate 1-to-whatever range?
Yeah thats what I decided but I would've expected a month date-type to
itself be an integer in the range 1-12 (or maybe 0-11) not "--01" to
"--12".

*sigh*

Oct 20 '06 #3

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

Similar topics

0
2714
by: pptran | last post by:
Hi, I am trying to rebuild our XS module using the newly installed Perl 5.8.4 with Dynamic Loading and 64-bit Integers enabled. During the XS make process, I ran into the following error...
1
1264
by: Ranjit | last post by:
Hi, This may be quite a dumb question but I have not been able to address this convincibly. How can I specify restrictions on basic data types in my xml? I did some search and came across...
1
6103
by: TIANA | last post by:
Hi guys, unfortunately i'm a newbee to java and xml and xsd... part of my xsd looks like this: <xs:simpleType name="val"> <xs:restriction base="xs:string"> <xs:enumeration...
2
1530
by: Adam Retter | last post by:
I would like to have an element defined in my XML Schema, that can hold either an xs:string or xs:int value. Is this possible? e.g. something like - <xs:element name="service">...
1
1850
by: Ed Sutton | last post by:
I have data from an embedded device that I want to represent as an XML schema. Each data sample in the device's data log consists of a 24-bit pressure value plus a 1 byte temperature value. I am...
2
2280
by: SA | last post by:
Hi all, in the following situation: <xs:element name="Type"> <xs:simpleType> <xs:restriction base="xs:NMTOKEN">
2
22462
by: Carmit | last post by:
Hi, I'm trying to build a proxy for this webservice: http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/EndTransactionLLSRQ.wsdl I'm getting the following error: Error: Unable to import...
7
2444
by: rbarschaw | last post by:
I have the following schema designed: <xs:complexType name="AzzFeature-BoxType" mixed="true"> <xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:element ref="Sub-Head" minOccurs="1"...
0
2819
by: Peter Larsen | last post by:
Is this really a valid schema design? <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="root">...
1
2303
by: naga01 | last post by:
Hi all, I have an XML in which i need to validate the attribute values based on another attribute value of the same tag. For Example <Employees...
0
7057
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
7102
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
7003
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
5357
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,...
1
4798
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...
0
4495
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...
0
1310
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 ...
1
570
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.