Re: Validate http/https

Thanks for the quick responses. They match my thoughts.

I think we'll continue to reject in the first version of the tool. In a future iteration we may add in a nice bit of this is valid but you need to replace all your http://schema with https:schema (that is if we ever have the resources to do that).

Thanks

Alasdair

-- 
Alasdair J G Gray
Associate Professor in Computer Science, 
School of Mathematical and Computer Sciences 
Heriot-Watt University, Edinburgh, UK.

Email: A.J.G.Gray@hw.ac.uk <mailto:A.J.G.Gray@hw.ac.uk>
Web: http://www.macs.hw.ac.uk/~ajg33

ORCID: http://orcid.org/0000-0002-5711-4872

Office: Earl Mountbatten Building 1.39
Twitter: @gray_alasdair
 
To arrange a meeting: http://doodle.com/ajggray

 
 

On 26/03/2020, 10:00, "Eric Prud'hommeaux" <eric@w3.org> wrote:

    apologies for the top-post; my regular mailer is in the shop
    
    So you have a ShEx schema like:
    
        PREFIX schema: <https://schema.org/>
        <#FooShape> {
          schema:name LITERAL
        }
    
    and data like:
    
        PREFIX schema: <http://schema.org/>
        <#myFoo>
          schema:name "Fooooo!" .
    
    and validation fails 'cause there's no <https://schema.org/name>?
    
    You could, as you alluded to, duplicate schemas:
    
        PREFIX schema: <http://schema.org/>
        PREFIX schemas: <https://schema.org/>
        <#FooHttpShape> {
          schema:name LITERAL
        }
        <#FooHttpsShape> {
          schemas:name LITERAL
        }
    
    which would be horrible but would ensure consistent use of http vs.
    https if you cared about that.
    
    You could `OneOf` them a la:
    
        PREFIX schema: <http://schema.org/>
        PREFIX schemas: <https://schema.org/>
        <#FooShape> {
          schema:name LITERAL | schemas:name LITERAL
        }
    
    which is a little nicer and reflects schema.org's disposition on http vs. https:
    
      There is a general trend towards using 'https' more widely, and you
      can already write 'https://schema.org' in your structured data. Over
      time we will migrate the schema.org site itself towards using https:
      as the default version of the site and our preferred form in
      examples. However 'http://schema.org' -based URLs in structured data
      markup will remain widely understood for the forseeable future and
      there should be no urgency about migrating existing data. This is a
      lengthy way of saying that both 'https://schema.org' and
      'http://schema.org' are fine.
      -- <https://schema.org/docs/faq.html#19>
    
    Another option would be to have two copies of the schema and sniff a
    little to see which one you want to execute. Still another would be to
    mechanically normalize the graph to https://schema.org before
    validation.
    
    I think the answer *should* be that the data is rejected because
    because having that choice is a burden for implementations everywhere
    and it likely to lead to spotty connformance. But it turns out that I
    don't get to make that call.
    
    
    On Thu, Mar 26, 2020 at 9:58 AM Gray, Alasdair J G <A.J.G.Gray@hw.ac.uk> wrote:
    >
    > Hi
    >
    >
    >
    > The Bioschemas community have been developing a validation tool for our profiles over the Schema.org vocabulary.
    >
    > https://bioschemas.org/profiles/

    >
    >
    >
    > We have recently come across the problem that we were saying that a resource was not valid because it had used the https form of schema.org whereas our ShEx schema stated that these should be http. Is there an easy way, without adding lots of conditionals, of validating both the http and the https forms?
    >
    >
    >
    > Thanks
    >
    >
    >
    > Alasdair
    >
    >
    >
    > --
    >
    > Alasdair J G Gray
    >
    > Associate Professor in Computer Science,
    > School of Mathematical and Computer Sciences
    > Heriot-Watt University, Edinburgh, UK.
    >
    > Email: A.J.G.Gray@hw.ac.uk
    > Web: http://www.macs.hw.ac.uk/~ajg33

    > ORCID: http://orcid.org/0000-0002-5711-4872

    > Office: Earl Mountbatten Building 1.39
    > Twitter: @gray_alasdair
    >
    >
    >
    > To arrange a meeting: http://doodle.com/ajggray

    >
    >
    >
    >
    >
    > ________________________________
    >
    > Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With campuses and students across the entire globe we span the world, delivering innovation and educational excellence in business, engineering, design and the physical, social and life sciences. This email is generated from the Heriot-Watt University Group, which includes:
    >
    > Heriot-Watt University, a Scottish charity registered under number SC000278
    > Heriot- Watt Services Limited (Oriam), Scotland's national performance centre for sport. Heriot-Watt Services Limited is a private limited company registered is Scotland with registered number SC271030 and registered office at Research & Enterprise Services Heriot-Watt University, Riccarton, Edinburgh, EH14 4AS.
    >
    > The contents (including any attachments) are confidential. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system.
    
    
    
    -- 
    -ericP
    office: +1.617.258.5741
    mobile: +1.617.599.3509
    

Received on Thursday, 26 March 2020 11:01:05 UTC