-
Notifications
You must be signed in to change notification settings - Fork 48
Description
The example with table group comprising three interrelated tables highlights a usability problem in the current specification.
The basis for the example is that two interrelated schemas can be published by a central authority and be used multiple times. Naturally this means that within the schemas themselves, there can't be any hard-coding of the URLs of the CSV files.
This works fine for the foreign keys because there is a mechanism there (the schemaReference property) to ensure that the key references whichever CSV file adheres to a known schema. But it falls down with the valueUrl or aboutUrl because those are always interpreted relative to the location of the CSV file the schema is being applied to; there is no mechanism to interpret those URLs relative to the base URL of a different CSV file.
You can see this in the example where the schema file junior-roles.json includes:
"valueUrl": "senior-roles.csv#post-{reportsToSenior}"
This hard-codes the name of the CSV file that adheres to the senior-roles.json schema in the paired publication. I don't think this is acceptable.
The only thing I can think of here, and it's really ugly, is to introduce some built-in variables to URL templates that look like _schema:encoded-schema-URL which would resolve to the base URL of the table that used that schema, so that you could do:
"valueUrl": "{_schema:http%3A%2F%2Fexample.org%2Fsenior-roles.json}#post-{reportsToSenior}"
and it would set the value URL property on the cell to something like "http://example.com/senior-roles.csv#post-1".
Alternatively, we can make the assumption that anyone creating data of this sort is going to want to create URLs that aren't based on the locations of CSV files and leave this as deliberately undefined. In that case we'll need to change the example in the RDF (and JSON) conversion documents accordingly.