srophe / srophe-eXist-app

DEPRECATED eXist code for Syriaca.org: The Syriac Reference Portal
GNU General Public License v3.0
10 stars 12 forks source link

Error on work/1598 #1035

Closed nathangibson closed 7 years ago

nathangibson commented 7 years ago

http://wwwb.library.vanderbilt.edu/exist/apps/srophe/work/1598 gives the following error:

exerr:ERROR XPTY0004: The actual cardinality for parameter 1 does not match the cardinality declared in the function's signature: string($arg as item()?) xs:string. Expected cardinality: zero or one, got 2. [at line 103, column 61, source: /db/apps/srophe/modules/lib/get-related.xqm] In function: rel:get-subject-type(xs:string) [81:26:/db/apps/srophe/modules/lib/get-related.xqm] rel:decode-relationship(node()) [242:25:/db/apps/srophe/modules/lib/get-related.xqm] rel:build-relationships(item(), item()) [211:72:/db/apps/srophe/modules/lib/get-related.xqm] ...

nathangibson commented 7 years ago

Removing duplicate relation fixed error for this record. (https://github.com/srophe/srophe-app-data/commit/c7b0ead7b6a6ef6aa6c17d3848aa2dd95af6f772)

Still, it would be nice to fix this so that the app doesn't break if there are others.

wsalesky commented 7 years ago

Fixed for future records.

nathangibson commented 7 years ago

Thanks!