Code Monkey home page Code Monkey logo

Comments (18)

gkellogg avatar gkellogg commented on May 19, 2024

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.

from schemaorg.

danbri avatar danbri commented on May 19, 2024

Another duplicate! #130

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

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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)

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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>

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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

from schemaorg.

rvguha avatar rvguha commented on May 19, 2024

Looks fine.

On Wed, Jan 21, 2015 at 5:11 AM, Dan Brickley [email protected]
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).

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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

from schemaorg.

sesuncedu avatar sesuncedu commented on May 19, 2024

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?

from schemaorg.

rvguha avatar rvguha commented on May 19, 2024

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 [email protected]
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).

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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

from schemaorg.

rvguha avatar rvguha commented on May 19, 2024

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 [email protected] 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 [email protected]
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)
.

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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)

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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

from schemaorg.

rvguha avatar rvguha commented on May 19, 2024

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.

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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.

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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.

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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> .

from schemaorg.

danbri avatar danbri commented on May 19, 2024

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.

from schemaorg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.