Giter Site home page Giter Site logo

Add ical about rdf-vocabularies HOT 13 CLOSED

zazuko avatar zazuko commented on May 31, 2024
Add ical

from rdf-vocabularies.

Comments (13)

rubensworks avatar rubensworks commented on May 31, 2024 1

This is also mentioned in the spec:

rdf:ID provides an additional check since the same name can only appear once in the scope of an xml:base value (or document, if none is given), so is useful for defining a set of distinct, related terms relative to the same IRI.

If I understand this part correctly, then the parsers that error on this document behave correctly.

In any case, I don't see a good reason to force a crash on this, which is why I'll add a config option to the streaming parser to disable this strict behaviour.

from rdf-vocabularies.

vhf avatar vhf commented on May 31, 2024 1

Great, it worked nicely, thanks @rubensworks !

from rdf-vocabularies.

vhf avatar vhf commented on May 31, 2024

as and xhv: all good!

ical makes https://github.com/rdfjs/rdfxml-streaming-parser.js crash with:

Found multiple occurrences of rdf:ID='http://www.w3.org/2002/12/cal/icaltzd#standard'.

from rdf-vocabularies.

iherman avatar iherman commented on May 31, 2024

@vhf I cannot comment on the streaming parser code. If I do

curl http://www.w3.org/2002/12/cal/icaltzd#standard

it works and returns an RDF/XML code.

from rdf-vocabularies.

vhf avatar vhf commented on May 31, 2024

@iherman Thanks, yes this serves Content-Location: icaltzd.rdf (curl -I http://www.w3.org/2002/12/cal/icaltzd#standard).

The issue is that this file cannot be parsed, it is probably not valid according to the schema. Here is the file, there might be other problems than these two but here's what the parser first notices:
https://gist.github.com/vhf/23705814109f8c18cfb100c053f3dc6b#file-icaltzd-rdf-L705-L722
These two are repeated 3 times:

  <owl:ObjectProperty rdf:ID="standard">
    <rdfs:label>STANDARD</rdfs:label>
  </owl:ObjectProperty>
  <owl:ObjectProperty rdf:ID="daylight">
    <rdfs:label>DAYLIGHT</rdfs:label>
  </owl:ObjectProperty>

from rdf-vocabularies.

ktk avatar ktk commented on May 31, 2024

I tried with rapper and riot as well, both with proper RDF/XML support. Neither of it is parsing the file. I will see if we can manually fix it, in that form it indeed does not seem to be valid.

from rdf-vocabularies.

iherman avatar iherman commented on May 31, 2024

Hm. I agree it is ugly. But I am not sure it is a bug. rdf:ID does not have to be unique in the sense like, for example xml:id must be: it is only an abbreviation of a URL. I.e., I wonder whether it is not the parser that is over-eager.

from rdf-vocabularies.

ktk avatar ktk commented on May 31, 2024

Hmm indeed, in riot it's just warnings, not errors. I will report this to the RDF/XML parser.

from rdf-vocabularies.

tpluscode avatar tpluscode commented on May 31, 2024

One would need to check with the spec. But, FWIW, it also fails on rdf-translator.appspot.com (Ruby RDFlib) as well as dotNetRDF :)

from rdf-vocabularies.

iherman avatar iherman commented on May 31, 2024

Per RDF/XML spec:

The rdf:ID attribute on a node element (not property element, that has another meaning) can be used instead of rdf:about and gives a relative IRI equivalent to # concatenated with the rdf:ID attribute value.

I.e., just as it is possible to repeat the value of rdf:about (it is "just" a URI) it is also possible to repeat rdf:ID.

In other words, and in spite of its name, rdf:ID is not the same as xml:id (or the id attribute in HTML) which assigns a unique ID to an element in the XML/HTML tree.

from rdf-vocabularies.

iherman avatar iherman commented on May 31, 2024

To be honest, I am not sure I fully understand that sentence... And it is in contradiction with what precedes, which says that rdf:ID is some sort of an abbreviation of rdf:about. Clearly, rdf:about can appear in the same RDF document many times...

I think it is certainly a good idea not to consider this as a full error and issue a warning instead.

(I wonder whether it is not a good idea to submit an official errata for RDF 1.1 on that.)

from rdf-vocabularies.

danbri avatar danbri commented on May 31, 2024

It is certainly confusing and to some extent misleading, but I wouldn't say they directly contradict each other.

If you get past "rdf:ID provides an additional check since the same name can only appear once in the scope of an xml:base value (or document, if none is given), so is useful for defining a set of distinct, related terms relative to the same IRI." ... then yes, it "can be used instead of rdf:about and gives a relative IRI equivalent to # concatenated with the rdf:ID attribute value."

Definitely errata material, worth a quick email to www-rdf-comments@ if that's where the most recent specs request errata drafts...

from rdf-vocabularies.

ktk avatar ktk commented on May 31, 2024

@vhf there is now an option in the RDF/XML parser, see linked issue from Ruben

from rdf-vocabularies.

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.