Closed wlpotter closed 2 years ago
I believe this is caused by the fact that in one case the citationUnit is left empty while in the other it is filled in with "p", so when functx:distinct-deep
is run on the sources index, the two can't be determined to be identical.
One solution would be to add "p" to the citationUnit further up the chain? e.g., if empty, make it "p"? (or vice versa where we strip out any <citationUnit>p</citationUnit>
s to just be empty and rely on the defaulting mechanism in the bibl element creation?
I think adding a "p" to empty citationUnits when the source index is created for a given row is the right move here. This could also mean we can delete the default addition of the "p" value for @unit
on tei:citedRange elements in the bibl element creation
Hmm this is proving more difficult than I anticipated...
There are three places where this would need to be addressed:
The really tricky case is what to do if there is no citation unit column in the first place, as happens for several of our input cases.
I believe I've isolated the problem. Making changes to the following three functions:
@unit
value, instead just pass the citationUnit value (given the change above, this conditional test becomes redundant)This appears to have worked.
For example, in person 3788 we have the following two bibls generated:
The script should only be generating a list of distinct tei:bibl elements.