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

RE: RE: ANN: Portable Data Component -- start/end

  • From: "David Lee" <dlee@calldei.com>
  • To: "'Costello, Roger L.'" <costello@mitre.org>, <xml-dev@l...>
  • Date: Mon, 18 Apr 2011 15:27:13 -0400

RE:  RE: ANN: Portable Data Component -- start/end
"Who's at fault"
Anyone who thinks using Time values instead of datetime values for actual
instances of a temporal point is at fault.
Time alone assumes a date is present in the context (either explicitly, or
as an occurrence etc).
Time alone can never specify a temporal point anymore more than an "x" value
alone can specify a point in 2D space or a fraction can specify a decimal.

David A. Lee

-----Original Message-----
From: Costello, Roger L. [mailto:costello@mitre.org] 
Sent: Monday, April 18, 2011 2:19 PM
To: xml-dev@lists.xml.org
Subject:  RE: ANN: Portable Data Component -- start/end

Hi Folks,

Suppose that a person records the start time and end time of a movie, which
starts at 11pm and ends at 1am the next day:


Validating that against the portable start/end data component (see below)
results in this error: "movie does not match the assertion".

Had the movie times been specified using dateTime:


then there would be no error.


Who's at fault? 

    - The person who specified the movie times using just time values? 
    - Or, the portable start/end data component for throwing an error on
perfectly good movie times?


P.S. Here's the portable start/end data component:

    <xs:complexType name="start-end-date-time">
            <xs:element name="start">
                    <xs:union memberTypes="xs:date xs:time 
                                           xs:dateTime" />
            <xs:element name="end" minOccurs="0">
                    <xs:union memberTypes="xs:date xs:time 
                                           xs:dateTime" />
        <xs:assert test="
              if (exists(end)) then 
                  if (start castable as xs:dateTime) then
                      xs:dateTime(end) gt xs:dateTime(start)
                  else if (start castable as xs:date) then
                      xs:date(end) gt xs:date(start)
                  else if (start castable as xs:time) then
                      xs:time(end) gt xs:time(start)
                  else true()
              else true()" />

Comments welcome.



XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.
First Name
Last Name
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.