ruby-rdf / rdf-vocab

Common RDF Vocabularies
The Unlicense
50 stars 29 forks source link

Expected result with RDF+xml #72

Closed markwilkinson closed 1 year ago

markwilkinson commented 2 years ago

Hi Gregg!

A question more than an "issue". In the docs you say RDF::vocab will work with "Turtle, JSON-LD, and HTML+RDFa" ... Does that mean that I should not expect it to work for :rdfxml? Or am I just doing it wrong? I'm limited to rdfxml because I need to do a stylesheet transform on the output but I'm not able to predict the XML namespaces in the output, so I'm hoping that I'm just missing something. If not, no worries. I can hack a solution that gets my problem solved!

Cheers!

gkellogg commented 2 years ago

The gem is independent of any actually serialization, and works on the underlying Graph/Repository implementation. No problems with RDF/XML, and AFAIKR, some of the loaded vocabularies came from RDF/XML representations.

If you have a specific issue you can describe, go ahead and add a reproducible code snippet here. It may end up being useful for someone else.

markwilkinson commented 2 years ago

Ok, I'll assume I'm just being stupid until I can clearly demonstrate a problem. I just noticed that I wasn't getting the expected output, checked the docs, and noticed that my serialization wasn't mentioned in the list of things that should work. So before trying to debug something that wasn't an error, I thought I'd take a moment to ask :-)

Cheers! I'm sure it's just my stupidity!

gkellogg commented 2 years ago

I’ll look into updating the docs.

gkellogg commented 2 years ago

Looking at the README, it says the following:

Also adds the gen-vocab command to the rdf command-line executable to generate specifically generated output in Turtle, JSON-LD, and HTML+RDFa for either built-in or arbitrary vocabularies.

This is for serializing a generated vocabulary,, which includes specific formatters for Turtle, JSON-LD and HTML+RDFa, but will attempt to output it for any supported serialization (including RDF/XML). Serializing a vocabulary is a special-case, and is unrelated to the use of a vocabulary within a Graph or Repository. Still, the README can be improved.