[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Schema for imprecise times


xsd datetime format
Title: RE: Schema for imprecise times

<!ELEMENT time #PCDATA>

(Sorry, I'm having a facile day)

-----Original Message-----
From: Rick Taylor
To: Paul Spencer; xml-dev@l...
Sent: 21/11/2002 17:58
Subject: Re: Schema for imprecise times

Our organization has come across this requirement also.
We settled for extending the dateTime format to include a significance
attribute (which itself has an enumeration type).  The downside is that
any
element declared to be of this type must be filled with "dummy" data to
fulfill the requirements of dateTime type.

That is if you have a dateTime in which is accurate to the hour you
would
need to fill in the minutes and seconds with 00:00.

The advantage is that no special processing is necessary for
applications
that only accept the dataTime format only.  They only need to be aware
that
the date has a significance associated with it and deal with it
accordingly.


<DateTimeElement significance="hour" xsi:type="qualifiedDateTime">
2002-11-21T09:00:00
<DateTimeElement>

<xsd:element name="DateTimeElement" type="xsd:dateTime"/>

<xsd:complexType name="qualifiedDateTime">
  <xsd:simpleContent>
   <xsd:extension base="dateTime">
    <xsd:attribute name="significance" type="dateTimeSignificanceList"
use="required"/>
   </xsd:extension>
  </xsd:simpleContent>
</xsd:complexType>


  <xsd:simpleType name="dateTimeSignificanceList">
    <xsd:annotation>
     <xsd:documentation>
      This is an enumeration of dateTime qualifier values.
     </xsd:documentation>
    </xsd:annotation>
   <xsd:restriction base="xsd:string">
    <xsd:enumeration value="second"/>
    <xsd:enumeration value="minute"/>
    <xsd:enumeration value="hour"/>
    <xsd:enumeration value="day"/>
    <xsd:enumeration value="week"/>
    <xsd:enumeration value="month"/>
    <xsd:enumeration value="quarter"/>
    <xsd:enumeration value="year"/>
    <xsd:enumeration value="decade"/>
    <xsd:enumeration value="century"/>
   </xsd:restriction>
  </xsd:simpleType>

At 02:14 PM 11/21/02 +0000, Paul Spencer wrote:
>I am looking for any prior art in representing imprecise times in XML.
>The requirement is simple - we want the WXS dateTime format, but with
>the ability to leave out the seconds or both the minutes and seconds.
>
>Paul Spencer
>
>-----------------------------------------------------------------
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://lists.xml.org/ob/adm.pl>

Rick Taylor
XML Developer
PPDM Association


-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>

The information transmitted by this e-mail message is intended solely for the use of the person to whom or entity to which it is addressed. The message may contain information that is privileged and confidential.  Disclosure, dissemination, distribution, review, retransmission to, other use of or taking any action in reliance upon this information by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please do not disseminate, distribute or copy this communication, by e-mail or otherwise. Instead, please notify us immediately by return e-mail (including the original message with your reply) and then delete and discard all copies of the message.

Although we have taken precautions to minimize the risk of transmitting viruses we nevertheless advise you to carry out your own virus checks on any attachment to this message. We accept no liability for any loss or damage caused by viruses.


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.