Skip to content

Instantly share code, notes, and snippets.

@kschlottmann
Created May 25, 2023 14:35
Show Gist options
  • Save kschlottmann/c6b967859afccfd4ef95ef8ec18ead60 to your computer and use it in GitHub Desktop.
Save kschlottmann/c6b967859afccfd4ef95ef8ec18ead60 to your computer and use it in GitHub Desktop.
this will find <title> elements without a render attribute in EAD
<data>
{
for $Record in /ead
where $Record/archdesc/dsc//title[not(@render)]
let $id := $Record/archdesc/did/unitid[1]/text()
let $title := $Record/archdesc/did/unittitle
let $repo := $Record/eadheader/eadid/@mainagencycode
return
<record>
{data($id), "|", data($repo), "|", data($title)}
</record>
}
</data>
@kschlottmann
Copy link
Author

{ for $Record in /ead/archdesc/dsc//c[(did/unittitle/title[not(@render)] or scopecontent/p/title[not(@render)])]

let $id := $Record/ancestor::archdesc/did/unitid[1]/text()
let $title := $Record//ancestor::archdesc/did/unittitle
let $repo := $Record//ancestor::archdesc/did/repository/corpname
let $content := $Record//title[not(@render)]
let $asid := $Record/@id
return

{data($id), "|", data($repo), "|", data($title), "|", data($asid), "|", $content}

}

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