wlpotter / csv-to-srophe

A set of XQuery modules for converting CSV data to Srophe-compliant TEI XML records. Developed for Syriaca.org
GNU General Public License v3.0
1 stars 1 forks source link

Entity base URIs are being added to SNAP relations in the `/relation/@passive` attributes #41

Closed wlpotter closed 2 years ago

wlpotter commented 2 years ago

Cf. #39

I think when I implemented the change in this comment, I added a test for passive attributes where if they didn't start with 'http' they got the entity base uri added.

See this commit, esp. l. 825 of csv2sroph.xqm there.

Easiest solution is to add "snap" as an 'or' in the condition, but wait on the end result of #35 before implementing.

wlpotter commented 2 years ago

This is not specific to snap relations. Cf. ISO lang codes: https://github.com/wlpotter/csv-to-srophe/blob/main/test/out/csv-tests/subjects/akkadian-language.xml#L117

Perhaps the test should be if it's just a numerical value assume it's a same-entity URI?

wlpotter commented 2 years ago

Just testing for numerical values, e.g. match($uri, "\A\d+\Z") to match only if there are numbers in the string wouldn't work if we ever used this on keywords or if the entity used alphanumeric for some reason.

So, I will instead just use 'or' conditionals for starts-with "ISO" or "snap:".