eeditiones / tei-publisher-app

The main TEI Publisher app
https://teipublisher.com
GNU General Public License v3.0
65 stars 33 forks source link

parallel translation is not working with page view on #41

Closed otichy closed 1 year ago

otichy commented 3 years ago

Hi,

Building on the Van Gogh letter (TEI Pub 6), I noticed that when I switch to page view, no translation is displayed. This does not work even in the original example a in TEI Pub 7 it throws an error. https://teipublisher.com/exist/apps/tei-publisher/test/let695.xml?id=pb-orig-1r-1&view=on

the server did not return any content
The request to the server failed.: exerr:ERROR XPTY0004: The actual cardinality for parameter 2 does not match the cardinality declared in the function's signature: pages:get-content($config as map(*), $div as element()) item()*. Expected cardinality: exactly one, got 0. [at line 358, column 53, source: /db/apps/tei-publisher/modules/lib/api/document.xql] In function: pages:get-content(map(*), element()) [357:44:/db/apps/tei-publisher/modules/lib/pages.xql] dapi:get-fragment(map(*)) [176:30:/db/apps/tei-publisher/modules/lib/api/document.xql]. XPTY0004: The actual cardinality for parameter 2 does not match the cardinality declared in the function's signature: pages:get-content($config as map(*), $div as element()) item()*. Expected cardinality: exactly one, got 0. [at line 358 of /db/apps/tei-publisher/modules/lib/api/document.xql]

Best

Ondrej

sk4699 commented 3 years ago

Hello. I have been experiencing the same error also while attempting to build on the Van Gogh letter and add a table of contents. I was wondering whether you were able to understand and resolve the issue, and if so, how? Thank you!

tuurma commented 1 year ago

Van Gogh app was designed to actually only work in the page-by-page view, which is set by default. This is, obviously, not true for all use cases and one might want to have parallel alignment regardless of the view chosen. Key to the success lies in the mapping function which determines the equivalent fragment, and this, ultimately, depends on the encoding scheme. I'd invite you, if still interested, to opening a more concrete discussion with examples on Slack, and then adding a FAQ entry.