You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In lobid-resources (repository) we transform catalog data in XML from a part of Germany to ntriples which we transform to JSON-LD. The JSON-LD data we show at a frontend (only German) and make it available via an API. An example:
To solve this problem I used <concat> on all roles, put it into a variable and then used regular expressions on the variable to create multiple, distinct contribution bnodes. Because this is needed for every fourth field from 100 to 296 it leads to many lines of code (even with <macro>) and I only can cover three role subfields: The first and last relators and one in the middle. What would easy the work a lot would be something like this:
Explanation: Create an agent id from a subfield, create multiple relators from all role subfields of the field 100, combine each relator with the agent for multiple contribution blank nodes.
I hope that I expressed myself good enough. If you have questions ask me or @dr0i .
Update: ntriples is the transformation format, not RDF/XML. It was simply too hot when I wrote this.
The text was updated successfully, but these errors were encountered:
In lobid-resources (repository) we transform catalog data in XML from a part of Germany to ntriples which we transform to JSON-LD. The JSON-LD data we show at a frontend (only German) and make it available via an API. An example:
Source material in an XML
Transformation format in simplified ntriples
JSON-LD, used for frontend and API format
To create distinct contribution blank nodes I would need a way to concat the agent id "http://d-nb.info/gnd/118506560" with each role id to "http://d-nb.info/gnd/118506560http://id.loc.gov/vocabulary/relators/cnd" and "http://d-nb.info/gnd/118506560http://id.loc.gov/vocabulary/relators/drt".
To solve this problem I used
<concat>
on all roles, put it into a variable and then used regular expressions on the variable to create multiple, distinct contribution bnodes. Because this is needed for every fourth field from 100 to 296 it leads to many lines of code (even with<macro>
) and I only can cover three role subfields: The first and last relators and one in the middle. What would easy the work a lot would be something like this:Explanation: Create an agent id from a subfield, create multiple relators from all role subfields of the field 100, combine each relator with the agent for multiple contribution blank nodes.
I hope that I expressed myself good enough. If you have questions ask me or @dr0i .
Update: ntriples is the transformation format, not RDF/XML. It was simply too hot when I wrote this.
The text was updated successfully, but these errors were encountered: