OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Schema for imprecise times

[ Lists Home | Date Index | Thread Index ]

Title: RE: [xml-dev] Schema for imprecise times

<!ELEMENT time #PCDATA>

(Sorry, I'm having a facile day)

-----Original Message-----
From: Rick Taylor
To: Paul Spencer; xml-dev@lists.xml.org
Sent: 21/11/2002 17:58
Subject: Re: [xml-dev] 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.





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS