Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check/Fix status of True and False #130

Closed
danbri opened this issue Sep 19, 2014 · 18 comments
Closed

Check/Fix status of True and False #130

danbri opened this issue Sep 19, 2014 · 18 comments
Assignees
Labels
schema.org vocab General top level tag for issues on the vocabulary type:bug A mistake or malfunction whose remedy should be straightforward technical work

Comments

@danbri
Copy link
Contributor

danbri commented Sep 19, 2014

http://schema.org/True
http://schema.org/False

"One thing, though: In the current version of schema.org, False and True are subtypes of Boolean. They should be instances / enumerated values."

Mostly recently pointed out by Martin Hepp, http://lists.w3.org/Archives/Public/public-vocabs/2014Sep/0191.html

(There's also the issue that such values very often show up as literals in data, even if they should be URIs. Could either try to fix documentation to encourage URI use, or document this as an 'expect the unexpected' pattern.)

@gkellogg
Copy link
Contributor

My reasoner treats schema:True/False, literals with datatype schema:Boolean or xsd:boolean, or text values of "true" or "false' as matching properties with a range of schema:Boolean, FWIW. Logically, it doesn't really matter if they are subclasses or instances, but I would encourage making them instances.

@danbri danbri added type:bug A mistake or malfunction whose remedy should be straightforward technical work schema.org vocab General top level tag for issues on the vocabulary needs review labels Jan 21, 2015
@danbri danbri added this to the sdo-gozer release milestone Jan 21, 2015
@danbri
Copy link
Contributor Author

danbri commented Jan 21, 2015

Another duplicate! #130

Let's fix this... I've asked for sanity check from @rvguha first in case the model was intended.

@danbri
Copy link
Contributor Author

danbri commented Jan 21, 2015

For reference,

    danbri-macbookpro:data danbri$ rdfa schema.rdfa | grep '/True'
    <http://schema.org/True> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/Boolean> .
    <http://schema.org/True> <http://www.w3.org/2000/01/rdf-schema#label> "True" .
    <http://schema.org/True> <http://www.w3.org/2000/01/rdf-schema#comment> "The boolean value true" .
    <http://schema.org/True> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Boolean> .
    danbri-macbookpro:data danbri$ rdfa schema.rdfa | grep '/False'
    <http://schema.org/False> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Boolean> .
    <http://schema.org/False> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/Boolean> .
    <http://schema.org/False> <http://www.w3.org/2000/01/rdf-schema#label> "False" .
    <http://schema.org/False> <http://www.w3.org/2000/01/rdf-schema#comment> "The boolean value false" .

Closing nearby duplicate report #226 (thanks @sesuncedu)

@danbri
Copy link
Contributor Author

danbri commented Jan 21, 2015

Also noting from https://www.w3.org/2011/webschema/track/issues/14 there are reasonable questions about the actual property values. Whether 'true', 'false' literals should be documented as acceptable.

I won't open another issue as it is better to get a unified understanding here. Copying in Martin Hepp's original comments:

    From Martin Hepp in https://docs.google.com/document/pub?id=1Kx63gW9DBky1j97Jpwl3dU9k0pKPSgCT3EntTVvGjX4

    You have to clarify the usage of http://schema.org/Boolean. The schema.org sponsors should clarify whether to use the RDF-compatible text (true/false) or the
    URIs http://schema.org/True and http://schema.org/False.
    For now, one would assume that you use the two values as individuals, e.g.
    <link itemprop=�propertyname� href=�http://schema.org/True� />
    <link itemprop=�propertyname� href=�http://schema.org/False� />
    which is incompatible with the RDFa patterns and also less concise.
    I suggest
    <meta itemprop="�propertyname"� content="�true"� >
    <meta itemprop="�propertyname" content="false" >


    Proposed change:

    A simple text amendment for http://schema.org/True, http://schema.org/False, and http://schema.org/Boolean would do the trick.:

    Note: The recommended use of this datatype is with a string “true� or “false� indicating the value of the respective property.
    Example:
    <div itemscope itemtype="http://schema.org/Book">
    <span itemprop="name">The Catcher in the Rye</span>
    Family-friendly: <meta itemprop="isFamilyFriendly" content="true"> yes
    </div>

@danbri
Copy link
Contributor Author

danbri commented Jan 21, 2015

Also Migrating notes from W3C:

    I talked to Ivan Herman, and we both thing simple text values 'true', 'false' ought to work ok in RDFa Lite as well as Microdata. It might not be formally datatyped but I think that's bearable.

    I took a look for properties that reference Boolean in the schema:


    TellyClub:alpha danbri$ grep -i Boolean _schema.nt 
    <http://schema.org/isFamilyFriendly> <http://schema.org/range> <http://schema.org/Boolean> .
    <http://schema.org/isDownloadable> <http://schema.org/range> <http://schema.org/Boolean> .
    <http://schema.org/representativeOfPage> <http://schema.org/range> <http://schema.org/Boolean> .
    <http://schema.org/Boolean> <http://www.w3.org/2000/01/rdf-schema#label> "Boolean" .
    <http://schema.org/Boolean> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/DataType> .
    <http://schema.org/Boolean> <http://www.w3.org/2000/01/rdf-schema#comment> "Boolean: True or False." .
    <http://schema.org/Boolean> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
    <http://schema.org/requiresSubscription> <http://schema.org/range> <http://schema.org/Boolean> .

    ...for the record.

    Dan Brickley, 9 May 2012, 16:30:28

@rvguha
Copy link
Contributor

rvguha commented Jan 21, 2015

Looks fine.

On Wed, Jan 21, 2015 at 5:11 AM, Dan Brickley notifications@github.com
wrote:

Also Migrating notes from W3C:

I talked to Ivan Herman, and we both thing simple text values 'true', 'false' ought to work ok in RDFa Lite as well as Microdata. It might not be formally datatyped but I think that's bearable.

I took a look for properties that reference Boolean in the schema:


TellyClub:alpha danbri$ grep -i Boolean _schema.nt
<http://schema.org/isFamilyFriendly> <http://schema.org/range> <http://schema.org/Boolean> .
<http://schema.org/isDownloadable> <http://schema.org/range> <http://schema.org/Boolean> .
<http://schema.org/representativeOfPage> <http://schema.org/range> <http://schema.org/Boolean> .
<http://schema.org/Boolean> <http://www.w3.org/2000/01/rdf-schema#label> "Boolean" .
<http://schema.org/Boolean> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/DataType> .
<http://schema.org/Boolean> <http://www.w3.org/2000/01/rdf-schema#comment> "Boolean: True or False." .
<http://schema.org/Boolean> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
<http://schema.org/requiresSubscription> <http://schema.org/range> <http://schema.org/Boolean> .

...for the record.

Dan Brickley, 9 May 2012, 16:30:28


Reply to this email directly or view it on GitHub
#130 (comment).

@danbri
Copy link
Contributor Author

danbri commented Jan 21, 2015

Status quo looks fine, or the suggestion to avoid having them as subtypes?

@sesuncedu
Copy link
Contributor

The only possible member of the extension of class schema:True is the
individual, schema:True.
This must be intensional, but surely can't be intentional (unless one
thinks about it).

Does the sentence "The subclass assertions for True and False should be
removed" obtain?

@rvguha
Copy link
Contributor

rvguha commented Jan 21, 2015

Sorry, what I meant was that we should have:

typeOf(True, Boolean) and
typeOf(False, Boolean) and
subClassOf(Boolean, Class)

On Wed, Jan 21, 2015 at 6:58 AM, Dan Brickley notifications@github.com
wrote:

Status quo looks fine, or the suggestion to avoid having them as subtypes?


Reply to this email directly or view it on GitHub
#130 (comment).

danbri added a commit that referenced this issue Apr 17, 2015
For #130
Note that there is not currently any navigation from a type to its
instances, except for Enumeration. I tried using Enumeration but
ran into HTML formatting issues, commented that out for now.
@danbri
Copy link
Contributor Author

danbri commented Apr 17, 2015

I've fixed the raw modeling. There are some HTML navigation consequences to address but I'll file that separately. Closing this one - thanks!

@rvguha
Copy link
Contributor

rvguha commented Apr 17, 2015

So, it might be time to bite the bullet and do this more correctly.

Boolean, Integer, etc. are classes, i.e., typeOf(Boolean, Class). They are
also instances of DataType, i.e., typeOf(Boolean, DataType).

What is DataType itself? Since instances of it are classes, it has to be a
subclass of Class.

guha

On Wed, Jan 21, 2015 at 8:31 AM, Guha guha@google.com wrote:

Sorry, what I meant was that we should have:

typeOf(True, Boolean) and
typeOf(False, Boolean) and
subClassOf(Boolean, Class)

On Wed, Jan 21, 2015 at 6:58 AM, Dan Brickley notifications@github.com
wrote:

Status quo looks fine, or the suggestion to avoid having them as subtypes?


Reply to this email directly or view it on GitHub
#130 (comment)
.

@danbri
Copy link
Contributor Author

danbri commented Apr 17, 2015

Re-opening w.r.t. "more correctly" (and related #218).

Here is what we have in the pending release:

<http://schema.org/Boolean> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/DataType> .
<http://schema.org/False> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Boolean> .
<http://schema.org/Boolean> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
<http://schema.org/True> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Boolean> .

Proposal is:

  • Boolean type DataType.
  • Boolean type Class.
  • False type Boolean.
  • True type Boolean
  • DataType subClassOf Class.
  • (... and likewise for other datatypes)

@danbri danbri reopened this Apr 17, 2015
@danbri
Copy link
Contributor Author

danbri commented Apr 24, 2015

Ping @rvguha - can you clarify 'more correctly' vs what we have now, as summarised above?

@rvguha
Copy link
Contributor

rvguha commented Apr 24, 2015

What I meant was that it is time for us to do it the way more expressive systems do it and have subclasses of Class. Exactly the way you list it above.

@danbri
Copy link
Contributor Author

danbri commented Apr 24, 2015

Thanks. In that case I believe we ought to be good to go. This is in the current repo:

rdfa data/schema.rdfa | grep DataType
<http://schema.org/DataType> <http://www.w3.org/2000/01/rdf-schema#comment> "The basic data types such as Integers, Strings, etc." .
<http://schema.org/DataType> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
<http://schema.org/DataType> <http://www.w3.org/2000/01/rdf-schema#label> "DataType" .
<http://schema.org/Text> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/DataType> .
<http://schema.org/Date> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/DataType> .
<http://schema.org/Boolean> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/DataType> .
<http://schema.org/Number> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/DataType> .
<http://schema.org/Time> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/DataType> .
<http://schema.org/DateTime> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://schema.org/DataType> .

... i.e. regular treatment of our 6 datatypes as subclasses of DataType. For completeness we could add the assertion that "DataType rdfs:subClassOf rdfs:Class", although that's implied by subtyping of it. Boolean was special in that its members are actually enumerated as schema.org terms; this is not the case for Text, Date, Number, Time or DateTime. I believe the only Boolean-specific issues left are regarding navigating between the Boolean type and its enumerated members, True and False. That is tracked as #433. It does leave one minor modeling-related issue:

Should we say that Boolean is also an Enumeration and try to re-use front-end display code, or adapt the site navigation specifically for this case? When I tested this the display was screwed up, but I've not investigated fully why yet. I'll track that at #433 and close this issue. Opinions (here or there) on whether we consider Boolean an Enumeration are welcomed. Default will be to do whatever is easiest.

@danbri danbri closed this as completed Apr 24, 2015
@danbri
Copy link
Contributor Author

danbri commented Apr 24, 2015

I'm sorry - I misread this. Reviewing #218 I see now that we have Boolean/Time/etc subClassOf DataType instead of 'type DataType'. Will fix.

@danbri danbri reopened this Apr 24, 2015
danbri added a commit that referenced this issue Apr 30, 2015
…tributes.

This is for cases where we want to give multiple types in the schema config, without verbosity.
This update also takes care to normalize the use of "rdf:type" in @Property to
create the exact same internal structure, i.e. canonicalize to http://schema.org/typeOf.
Intent is to avoid subtle bugs where we have two kinds of type triple depending on which
piece of RDFa syntax is used.

Required for #218 and #130 cleanup of meta-model.
danbri added a commit that referenced this issue Apr 30, 2015
marked as being of 'type' DataType, rather than a subtype of DataType.

We need to update the UI/navigation accordingly.

This is for #218 and #130
@danbri
Copy link
Contributor Author

danbri commented Apr 30, 2015

Ok, here is what we now have in the next pending release (sdo-gozer):

rdfa data/schema.rdfa | grep DataType
<http://schema.org/DataType> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
<http://schema.org/DataType> <http://www.w3.org/2000/01/rdf-schema#comment> "The basic data types such as Integers, Strings, etc." .
<http://schema.org/DataType> <http://www.w3.org/2000/01/rdf-schema#label> "DataType" .
<http://schema.org/Date> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/DataType> .
<http://schema.org/DateTime> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/DataType> .
<http://schema.org/Time> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/DataType> .
<http://schema.org/Number> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/DataType> .
<http://schema.org/Boolean> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/DataType> .
<http://schema.org/Text> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/DataType> .

This has now somewhat messed up the site navigation that we have in http://schema.org/DataType, since 'more specific types' (i.e. subtypes) list is empty. I also had to make some changes to our RDFa (hack)parser to support whitespace-separated multiple types in @typeof, and/or use of @Property with rdf:type.

Update: also added:

<http://schema.org/DataType> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Class> .

@danbri
Copy link
Contributor Author

danbri commented Apr 30, 2015

I believe the raw schema/vocab aspect is settled (and documented briefly in docs/releases.html). See #463 for UI/python fixes required to make this navigable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema.org vocab General top level tag for issues on the vocabulary type:bug A mistake or malfunction whose remedy should be straightforward technical work
Projects
None yet
Development

No branches or pull requests

4 participants