You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jena.apache.org by "Tomvbe (via GitHub)" <gi...@apache.org> on 2024/01/15 13:35:26 UTC
[I] Issue with using the document base for the default vocabulary in JSON-LD 1.1 [jena]
Tomvbe opened a new issue, #2196:
URL: https://github.com/apache/jena/issues/2196
### Version
4.10.0
### What happened?
**Description**
As of JSON-LD 1.1 it is possible to use "#" as the vocabulary mapping (https://www.w3.org/TR/json-ld11/#document-relative-vocabulary-mapping).
Jena parses this incorrectly, it ignores the "#".
**Reproduction**
When we expand the following JSON-LD 1.1 to TURTLE:
```
{
"@context": {
"@version": 1.1,
"@base": "http://example/document",
"@vocab": "#"
},
"@id": "http://example.org/places#BrewEats",
"@type": "Restaurant",
"name": "Brew Eats"
}
```
in jena we get the following output (notice the missing '#' before 'Restaurant' and 'name'):
```
@prefix : <#> .
<http://example.org/places#BrewEats> a <http://example/documentRestaurant>;
<http://example/documentname> "Brew Eats" .
```
We expect the following output (cfr. https://www.w3.org/TR/json-ld11/#document-relative-vocabulary-mapping):
```
<http://example.org/places#BrewEats> a <http://example/document#Restaurant> ;
<http://example/document#name> "Brew Eats" .
```
### Relevant output and stacktrace
_No response_
### Are you interested in making a pull request?
None
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] Issue with using the document base for the default vocabulary in JSON-LD 1.1 [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs closed issue #2196: Issue with using the document base for the default vocabulary in JSON-LD 1.1
URL: https://github.com/apache/jena/issues/2196
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] Issue with using the document base for the default vocabulary in JSON-LD 1.1 [jena]
Posted by "filip26 (via GitHub)" <gi...@apache.org>.
filip26 commented on issue #2196:
URL: https://github.com/apache/jena/issues/2196#issuecomment-1908327504
I confirm it's expansion bug. An input is expanded before serialization into RDF so the bug propagates down the stream. Will be fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] Issue with using the document base for the default vocabulary in JSON-LD 1.1 [jena]
Posted by "filip26 (via GitHub)" <gi...@apache.org>.
filip26 commented on issue #2196:
URL: https://github.com/apache/jena/issues/2196#issuecomment-1908949238
Fixed in trunk (`1.4.0-SNAPSHOT`). Titanium `v1.4.0` will be released during February, hopefully.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] Issue with using the document base for the default vocabulary in JSON-LD 1.1 [jena]
Posted by "filip26 (via GitHub)" <gi...@apache.org>.
filip26 commented on issue #2196:
URL: https://github.com/apache/jena/issues/2196#issuecomment-1964720567
just heads up, v1.4.0 has been released https://github.com/filip26/titanium-json-ld/releases/tag/v1.4.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] Issue with using the document base for the default vocabulary in JSON-LD 1.1 [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on issue #2196:
URL: https://github.com/apache/jena/issues/2196#issuecomment-1894161522
Hi @Tomvbe,
Jena uses [Titanium JSON-LD](https://github.com/filip26/titanium-json-ld) for parsing JSON-LD.
Tracing the example, Jena calls Titanium with
```java
private void read(Document document, String baseURI, StreamRDF output, Context context) throws JsonLdError {
// JSON-LD to RDF
JsonLdOptions opts = getJsonLdOptions(baseURI, context);
RdfDataset dataset = JsonLd.toRdf(document).options(opts).base(baseURI).get();
extractPrefixes(document, output::prefix);
JenaTitanium.convert(dataset, profile, output);
}
```
`opts` is `new JsonLdOptions()`, `baseURI` is null.
It seems the URI coming back from Titanium in `RdfDataset` is "http://example/documentRestaurant" so it looks like an issue within Titanium.
cc: @filip26
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org