Regenerated the list of duplicated ids
Posted by mholmes on 10 Jan 2013 in Activity log
To make this (and other things) simpler, I added @xml:id attributes to the root elements of all our files. For the record, to save a couple of minutes, here's the code to get duplicate ids for pasting into a spreadsheet. Don't forget to set the number of results high enough.
declare default element namespace "http://www.tei-c.org/ns/1.0"; for $id in distinct-values(//entry/@xml:id) let $c := count(//entry[@xml:id=$id]), $docs := if ($c gt 1) then //TEI[descendant::entry[@xml:id=$id]]/@xml:id else () where $c gt 1 order by $id return concat($id, ' ', $c, ' ', string-join($docs, ', '))