Comments (13)
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 anxml: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.
Great, it worked nicely, thanks @rubensworks !
from rdf-vocabularies.
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.
@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.
@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.
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.
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.
Hmm indeed, in riot
it's just warnings, not errors. I will report this to the RDF/XML parser.
from rdf-vocabularies.
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.
Per RDF/XML spec:
The
rdf:ID
attribute on a node element (not property element, that has another meaning) can be used instead ofrdf:about
and gives a relative IRI equivalent to # concatenated with therdf: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.
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.
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.
@vhf there is now an option in the RDF/XML parser, see linked issue from Ruben
from rdf-vocabularies.
Related Issues (20)
- New ontology: EXIF
- New ontology: EBUCore
- ebucore prefix is wrong
- New ontology: dcmitype HOT 1
- Adjust GS1 source HOT 1
- Make ontologies available in standalone repository, to include with git sub modules HOT 2
- Request for new vocabularies HOT 3
- High-level Strategy for rdf-vocabularies
- Wrong namespace for EARL HOT 1
- New ontology: metadata4ing HOT 1
- W3C Block HOT 4
- Rename dc11 to dc? HOT 1
- DBpedia prefixes HOT 2
- Extract prefix list into its own library HOT 10
- schema.org download location HOT 1
- Overlapping prefixes HOT 1
- Add Bibliographic Ontology (BIBO) HOT 1
- Using expand requires raw-loader HOT 1
- Bug: buildPath returning incorrect path HOT 2
- Extract the code used to generate this package contents (index, etc.) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rdf-vocabularies.