W3C home > Mailing lists > Public > semantic-web@w3.org > March 2021

Re: Why do datatypes defined by datatype definition axioms have empty lexical spaces?

From: Antoine Zimmermann <antoine.zimmermann@emse.fr>
Date: Wed, 31 Mar 2021 15:02:40 +0200
To: "Shaw, Ryan" <ryanshaw@unc.edu>, "semantic-web@w3.org" <semantic-web@w3.org>
Message-ID: <ba219283-07f1-90b3-c90d-c4d186bdeacf@emse.fr>
Ryan,


You posted your question on StackOverflow too, and I gave an answer to 
it there:

https://stackoverflow.com/a/66888357/1260887

Regardless, this kind of technical question on a W3C specification can 
be addressed as a comment to the related working group, in this case, 
the OWL Working Group, at email address public-owl-comments@w3.org .


--AZ

Le 29/03/2021 à 23:26, Shaw, Ryan a écrit :
> Section 9.4 Datatype Definitions 
> <https://www.w3.org/TR/owl2-syntax/#Datatype_Definitions> of the OWL 2 
> Web Ontology Language Structural Specification shows how custom 
> datatypes can be defined, giving the following example:
> 
> |a:SSN rdf:type rdfs:Datatype . a:SSN owl:equivalentClass [ rdf:type 
> rdfs:Datatype ; owl:onDatatype xsd:string ; owl:withRestrictions ( [ 
> xsd:pattern "[0-9]{3}-[0-9]{2}-[0-9]{4}" ] ) ] . a:hasSSN rdfs:range 
> a:SSN . |
> 
> So here we’re defining a new datatype |a:SSN| by restricting the 
> |xsd:string| datatype via the |xsd:pattern| facet. So far so good.
> 
> 
> But then the specification says something I don’t understand:
> 
>     The datatypes defined by datatype definition axioms … have empty
>     lexical spaces and therefore they must not occur in literals.
> 
> Why would |a:SSN| have an empty lexical space here? It was defined by 
> constraining the value space of |xsd:string| via |xsd:pattern| facet. 
> Section 4.3.4 pattern 
> <https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.html#rf-pattern> of 
> XSD 1.1 Part 2: Datatypes says that
> 
>     … *pattern* is a constraint on the ·value space· of a datatype which
>     is achieved by constraining the ·lexical space· to ·literals· which
>     match each member of a set of ·regular expressions·.
> 
> So we’re constraining the value space of |xsd:string|, but we’re doing 
> that by constraining the lexical space of |xsd:string| (the set of 
> finite-length sequences of zero or more characters … that ·match· the 
> Char production from XML 
> <https://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/datatypes.html#string>) 
> to literals that match the regular expression. So why does the OWL spec 
> say that the lexical space of |a:SSN| is empty, rather than the the set 
> of finite-length sequences of zero or more characters (as defined in 
> XML) that match the regular expression |[0-9]{3}-[0-9]{2}-[0-9]{4}|?
> 
> 
> More pragmatically, the OWL spec says
> 
>     … there can be no literals of datatype |a:SSN|.
> 
> So does that mean that |a:SSN| cannot be used as follows?
> 
> |a:Jane a:hasSSN "123-45-6789"^^a:SSN . |
> 
> If so, how is one supposed to use the |a:SSN| datatype? Is the idea that 
> one should write
> 
> |a:Jane a:hasSSN "123-45-6789"^^xsd:string . |
> 
> and infer from the declared range of |a:hasSSN| what the actual datatype 
> is and thus whether value is valid?
> 
> Ryan


-- 
Antoine Zimmermann
ISI - Institut Henri Fayol
École des Mines de Saint-Étienne
158 cours Fauriel
42023 Saint-Étienne Cedex 2
France
Tél:+33(0)4 77 42 66 03
https://www.emse.fr/~zimmermann/
Received on Wednesday, 31 March 2021 13:02:59 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:46:06 UTC