Skip to content

Commit

Permalink
Fixing #34
Browse files Browse the repository at this point in the history
  • Loading branch information
wlpotter committed Dec 15, 2021
1 parent f70a0e6 commit 9fa51ac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/csv2persons.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ as node()

(: build descendant nodes of the tei:person :)

(: HARD-CODED pending batch changes will affect this functionality :)
let $anaAttr := if(functx:trim($row/*[name() = "trait.en"]/text()) = "anonymous") then attribute {"ana"} {"#syriaca-anonymous"}

let $headwords := csv2srophe:build-element-sequence($row, $headwordIndex, $sources, "persName", 0)
let $numHeadwords := count($headwords)
let $anonymousDesc := csv2srophe:build-element-sequence($row, $anonymousDescIndex, $sources, "persName", $numHeadwords)
Expand All @@ -124,11 +127,11 @@ as node()

let $bibls := csv2srophe:create-bibl-sequence($row, $sources)

(: compose tei:place element and return it :)
(: compose tei:person element and return it :)

return
<person xmlns="http://www.tei-c.org/ns/1.0" xml:id="person-{$uriLocalName}">
{$headwords, $anonymousDesc, $persNames, $idnos, $trait, $sex, $dates, $abstracts, $bibls}
{$anaAttr, $headwords, $anonymousDesc, $persNames, $idnos, $trait, $sex, $dates, $abstracts, $bibls}
</person>
};

Expand Down

0 comments on commit 9fa51ac

Please sign in to comment.