Skip to content

Instantly share code, notes, and snippets.

@hellbunnie
Last active November 20, 2019 14:14
Show Gist options
  • Save hellbunnie/e941f3380b4d962b1744b7d430d5356a to your computer and use it in GitHub Desktop.
Save hellbunnie/e941f3380b4d962b1744b7d430d5356a to your computer and use it in GitHub Desktop.
This is the test Open Refine Export template for the first batch of AP data
{{forNonBlank(cells["filename"], v, "FILENAME "+v.value, "")}}
<qualifieddc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:marcrel="http://www.loc.gov/marc.relators/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/marc.relators/ http://imlsdcc2.grainger.illinois.edu/registry/marcrel.xsd" xsi:noNamespaceSchemaLocation="http://dublincore.org/schemas/xmls/qdc/2008/02/11/qualifieddc.xsd">
{{forNonBlank(cells["identifier"], v, "<dc:identifier>"+v.value+"</dc:identifier>", "")}}
{{forNonBlank(cells["title"], v, "<dc:title>"+v.value+"</dc:title>", "")}}
{{forNonBlank(cells["type01"], v, "<dc:type>"+v.value+"</dc:type>", "")}}
{{forNonBlank(cells["type02"], v, "<dc:type>"+v.value+"</dc:type>", "")}}
{{forNonBlank(cells["description"], v, "<dc:description>"+v.value+"</dc:description>", "")}}
{{forNonBlank(cells["language"], v, "<dc:language>"+v.value+"</dc:language>", "")}}
{{forNonBlank(cells["creator01"], v, "<dc:creator>"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["creator02"], v, "<dc:creator>"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["creator03"], v, "<dc:creator>"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["creator04"], v, "<dc:creator>"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["creator05"], v, "<dc:creator>"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["contributor"], v, "<dc:contributor>"+v.value+"</dc:contributor>", "")}}
{{forNonBlank(cells["aut-author01"], v, "<marcrel:aut>"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author02"], v, "<marcrel:aut>"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author03"], v, "<marcrel:aut>"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author04"], v, "<marcrel:aut>"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author05"], v, "<marcrel:aut>"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author06"], v, "<marcrel:aut>"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author07"], v, "<marcrel:aut>"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author08"], v, "<marcrel:aut>"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["date of creation"], v, "<dcterms:created>"+v.value+"</dcterms:created>", "")}}
{{forNonBlank(cells["coverage (spatial)"], v, "<dcterms:spatial>"+v.value+"</dcterms:spatial>", "")}}
{{forNonBlank(cells["coverage (temporal)"], v, "<dcterms:temporal>"+v.value+"</dcterms:temporal>", "")}}
{{forNonBlank(cells["subject01"], v, "<dc:subject>"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject02"], v, "<dc:subject>"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject03"], v, "<dc:subject>"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject04"], v, "<dc:subject>"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject05"], v, "<dc:subject>"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject06"], v, "<dc:subject>"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject07"], v, "<dc:subject>"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject08"], v, "<dc:subject>"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject09"], v, "<dc:subject>"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["rights"], v, "<dc:rights>"+v.value+"</dc:rights>", "")}}
{{forNonBlank(cells["format01"], v, "<dc:format>"+v.value+"</dc:format>", "")}}
{{forNonBlank(cells["format02"], v, "<dc:format>"+v.value+"</dc:format>", "")}}
</qualifieddc>
@AnjaMahler
Copy link

Hi Kathryn,

I added dc:relation

{{forNonBlank(cells["filename"], v, "FILENAME "+v.value, "")}}

{{forNonBlank(cells["identifier"], v, "dc:identifier"+v.value+"</dc:identifier>", "")}}
{{forNonBlank(cells["title"], v, "dc:title"+v.value+"</dc:title>", "")}}
{{forNonBlank(cells["type01"], v, "dc:type"+v.value+"</dc:type>", "")}}
{{forNonBlank(cells["type02"], v, "dc:type"+v.value+"</dc:type>", "")}}
{{forNonBlank(cells["description"], v, "dc:description"+v.value+"</dc:description>", "")}}
{{forNonBlank(cells["language"], v, "dc:language"+v.value+"</dc:language>", "")}}
{{forNonBlank(cells["creator01"], v, "dc:creator"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["creator02"], v, "dc:creator"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["creator03"], v, "dc:creator"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["creator04"], v, "dc:creator"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["creator05"], v, "dc:creator"+v.value+"</dc:creator>", "")}}
{{forNonBlank(cells["contributor"], v, "dc:contributor"+v.value+"</dc:contributor>", "")}}
{{forNonBlank(cells["aut-author01"], v, "marcrel:aut"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author02"], v, "marcrel:aut"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author03"], v, "marcrel:aut"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author04"], v, "marcrel:aut"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author05"], v, "marcrel:aut"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author06"], v, "marcrel:aut"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author07"], v, "marcrel:aut"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["aut-author08"], v, "marcrel:aut"+v.value+"</marcrel:aut>", "")}}
{{forNonBlank(cells["date of creation"], v, "dcterms:created"+v.value+"</dcterms:created>", "")}}
{{forNonBlank(cells["coverage (spatial)"], v, "dcterms:spatial"+v.value+"</dcterms:spatial>", "")}}
{{forNonBlank(cells["coverage (temporal)"], v, "dcterms:temporal"+v.value+"</dcterms:temporal>", "")}}
{{forNonBlank(cells["subject01"], v, "dc:subject"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject02"], v, "dc:subject"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject03"], v, "dc:subject"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject04"], v, "dc:subject"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject05"], v, "dc:subject"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject06"], v, "dc:subject"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject07"], v, "dc:subject"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject08"], v, "dc:subject"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["subject09"], v, "dc:subject"+v.value+"</dc:subject>", "")}}
{{forNonBlank(cells["rights"], v, "dc:rights"+v.value+"</dc:rights>", "")}}
{{forNonBlank(cells["relation01"], v, "dc:relation"+v.value+"</dc:relation>", "")}}
{{forNonBlank(cells["relation02"], v, "dc:relation"+v.value+"</dc:relation>", "")}}
{{forNonBlank(cells["relation03"], v, "dc:relation"+v.value+"</dc:relation>", "")}}
{{forNonBlank(cells["relation04"], v, "dc:relation"+v.value+"</dc:relation>", "")}}
{{forNonBlank(cells["format01"], v, "dc:format"+v.value+"</dc:format>", "")}}
{{forNonBlank(cells["format02"], v, "dc:format"+v.value+"</dc:format>", "")}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment