Skip to content

Allow XML datetimes that do not include fractional seconds #142

@bbartley

Description

@bbartley

It appears that the validator requires that XML Datetimes include time in milliseconds. Hence, the following datetime is considered valid:

<prov:endedAtTime>2017-03-06T15:00:00.000+00:00</prov:endedAtTime>

While the following datetime is considered invalid, even though it is semantically equivalent as the one above:

<prov:endedAtTime>2017-03-06T15:00:00+00:00</prov:endedAtTime>

The Python datetime library omits fractional seconds by default, so it would be nice if SBOL-Validator permitted datetimes in this format.

Here are complete test files:

Invalid:

<rdf:RDF xmlns:brick="https://brickschema.org/schema/Brick#" xmlns:csvw="http://www.w3.org/ns/csvw#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcam="http://purl.org/dc/dcam/" xmlns:doap="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:geo="http://www.opengis.net/ont/geosparql#" xmlns:odrl="http://www.w3.org/ns/odrl/2/" xmlns:org="http://www.w3.org/ns/org#" xmlns:prof="http://www.w3.org/ns/dx/prof/" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:qb="http://purl.org/linked-data/cube#" xmlns:schema="https://schema.org/" xmlns:sh="http://www.w3.org/ns/shacl#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:sosa="http://www.w3.org/ns/sosa/" xmlns:ssn="http://www.w3.org/ns/ssn/" xmlns:time="http://www.w3.org/2006/time#" xmlns:vann="http://purl.org/vocab/vann/" xmlns:void="http://rdfs.org/ns/void#" xmlns:wgs="https://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:sbol="http://sbols.org/v2#" xmlns:ns0="http://wiki.synbiohub.org/wiki/Terms/synbiohub#" xmlns:backport="http://sboltools.org/backport#">
  <prov:Activity rdf:about="https://synbiohub.org/public/igem/igem2sbol/1">
    <dcterms:title>iGEM to SBOL conversion</dcterms:title>
    <ns0:ownedBy rdf:resource="https://synbiohub.org/user/james"/>
    <prov:endedAtTime>2017-03-06T15:00:00+00:00</prov:endedAtTime>
    <dcterms:description>Conversion of the iGEM parts registry to SBOL2.1</dcterms:description>
    <backport:sbol3namespace rdf:resource="https://synbiohub.org"/>
    <sbol:displayId>igem2sbol</sbol:displayId>
    <ns0:topLevel rdf:resource="https://synbiohub.org/public/igem/igem2sbol"/>
    <sbol:version>1</sbol:version>
    <ns0:ownedBy rdf:resource="https://synbiohub.org/user/myers"/>
    <prov:wasDerivedFrom rdf:resource="https://synbiohub.org/public/igem/igem2sbol"/>
    <dc:creator>Chris J. Myers</dc:creator>
    <sbol:persistentIdentity rdf:resource="https://synbiohub.org/public/igem/igem2sbol"/>
    <dc:creator>James Alastair McLaughlin</dc:creator>
  </prov:Activity>
</rdf:RDF>

Valid:

<rdf:RDF xmlns:brick="https://brickschema.org/schema/Brick#" xmlns:csvw="http://www.w3.org/ns/csvw#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcat="http://www.w3.org/ns/dcat#" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcam="http://purl.org/dc/dcam/" xmlns:doap="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:geo="http://www.opengis.net/ont/geosparql#" xmlns:odrl="http://www.w3.org/ns/odrl/2/" xmlns:org="http://www.w3.org/ns/org#" xmlns:prof="http://www.w3.org/ns/dx/prof/" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:qb="http://purl.org/linked-data/cube#" xmlns:schema="https://schema.org/" xmlns:sh="http://www.w3.org/ns/shacl#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:sosa="http://www.w3.org/ns/sosa/" xmlns:ssn="http://www.w3.org/ns/ssn/" xmlns:time="http://www.w3.org/2006/time#" xmlns:vann="http://purl.org/vocab/vann/" xmlns:void="http://rdfs.org/ns/void#" xmlns:wgs="https://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:backport="http://sboltools.org/backport#" xmlns:om="http://www.ontology-of-units-of-measure.org/resource/om-2/" xmlns:sbol="http://sbols.org/v2#" xmlns:ns0="http://wiki.synbiohub.org/wiki/Terms/synbiohub#" xmlns:ns2="http://wiki.synbiohub.org/wiki/Terms/igem#">
  <prov:Activity rdf:about="https://synbiohub.org/public/igem/igem2sbol">
    <dcterms:description>Conversion of the iGEM parts registry to SBOL2.1</dcterms:description>
    <dcterms:title>iGEM to SBOL conversion</dcterms:title>
    <prov:endedAtTime>2017-03-06T15:00:00.000+00:00</prov:endedAtTime>
    <backport:sbol3namespace rdf:resource="https://synbiohub.org"/>
    <sbol:displayId>igem2sbol</sbol:displayId>
    <dc:creator>Chris J. Myers</dc:creator>
    <sbol:version>1</sbol:version>
    <ns0:ownedBy rdf:resource="https://synbiohub.org/user/myers"/>
    <sbol:persistentIdentity rdf:resource="https://synbiohub.org/public/igem/igem2sbol"/>
    <dc:creator>James Alastair McLaughlin</dc:creator>
    <ns0:ownedBy rdf:resource="https://synbiohub.org/user/james"/>
    <ns0:topLevel rdf:resource="https://synbiohub.org/public/igem/igem2sbol"/>
  </prov:Activity>
</rdf:RDF>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions