EARL Dates

Firstly, I think that making the distinction of "NonUniqueTestSubject"
was a bit of a mistake - it's an oxymoron because datestamped test
subjects are always unique, even if they have multiple dates. The
actual intention was to say that the amount of dates attached to it
are not unique, but I fear that people may misinterpret it and think
that the content can change about.

Anyway, I've been messing about with XML Schema datatypes, and have
come up with a simple datatype for earl:Date. The main EARL schema
part is:-

   earl:date a daml:DatatypeProperty;
      rdfs:range earl:Date;
      rdfs:subPropertyOf dc:date .
   earl:Date daml:disjointUnionOf (earl:DateRange earldata:Date) .

   earl:DateRange daml:intersectionOf
        ([ daml:onProperty earl:fromDate;
           daml:hasClass earldata:Date ]
         [ daml:onProperty earl:toDate;
           daml:hasClass earldata:Date ]) .

Where earldata:Date is an XSD datatype:-

   <xsd:schema
      xmlns="http://www.w3.org/2001/03/earl/0.95datatypes#"
      xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
      xml:lang="en" >
   <xsd:simpleType name="Date">
     <!-- Date is an XMLS union datatype -->
     <!-- values of Date may be either dates or dateTimes -->
     <xsd:union>
        <xsd:simpleType>
          <xsd:restriction base="xsd:date"/>
        </xsd:simpleType>
        <xsd:simpleType>
          <xsd:restriction base="xsd:dateTime"/>
        </xsd:simpleType>
     </xsd:union>
   </xsd:simpleType>
   </xsd:schema>

Note: earl:date has no strict domain semantics, so you can't get out
of stating what type of content a resource is. Also, there is still a
restriction of the cardinality of earl:date w.r.t. any instance of
earl:TestSubject - must have at least one earl:date property set.

Examples:-

   :MyPage a earl:TestSubject;
      earl:date "2001-03-17", "2001-03-21" .

   :MyOtherPage a earl:TestSubject;
      earl:date [ earl:fromDate "2001-03-17";
                      earl:toDate "2001-03-21" ] .

Hmm... the value of earl:toDate obviously has to be later than
earl:fromDate, but I'm not sure how to constrain that using RDF
semantics yet. The whole datatypes area is a bit dodgy, so prose will
have to do it for now. Anyway, it's also possible to say that
something fails and passes the same test - and I don't think it's
something we want to constrain. Let the parsers figure it out.

Note that the only place where an earl:date is mandatory is on a
earl:TestSubject - it's still optional for earl:Assertor
earl:ResultProperty and earl:TestCase, and you can still use dc:date
on those particular things.

The only issue now is whether or not we put a "#" on the end of the
XSD namespace. We must ask the XML Schema people - I'll try XML Schema
Dev.

--
Kindest Regards,
Sean B. Palmer
@prefix : <http://webns.net/roughterms/> .
:Sean :hasHomepage <http://purl.org/net/sbp/> .

Received on Wednesday, 16 May 2001 20:50:21 UTC