wolfgangmm / tei-simple-pm

An implementation of the TEI Simple ODD extensions for processing models in XQuery.
http://showcases.exist-db.org/exist/apps/tei-simple/index.html
20 stars 9 forks source link

TEI Publisher vs TEI Processing Model Toolbox ??? #26

Open emmamorlock opened 7 years ago

emmamorlock commented 7 years ago

I don't quite get how to get and install the new TEI publisher version:

A part from the icons and the <h1> of the home page, are there differences between TEI Publisher (visible on the show case at and the pre-installed TEI Processing Model toolbox v1.1.1 ? If yes, how to install TEI Publisher?

Thanks ! Emmanuelle

wolfgangmm commented 7 years ago

TEI Publisher 2.0 is available in eXist's package manager, but only if you run the latest develop version of eXist. It will become more widely available when eXist 3 is released.

To build yourself, the code is available in our gitlab: http://gitlab.exist-db.org/tei-publisher

Note you have to clone both tei-publisher-lib and tei-publisher-app and install the lib first.

emmamorlock commented 7 years ago

Thanks a lot! I thought the nightly builds were the latest develop version. I installed the d555767 from 2017-01-08 but didn't find TEI publisher 2.0 in the package manager, just TEI processing toolbox.

joewiz commented 7 years ago

@emmamorlock Unfortunately the latest nightly build is from git revision d5557672f71759a1c38dadd172b6f682d11affdd, but you need a build from a slightly newer revision, cf4dd21b6a1bdccadb27092ebdcd589dff1e7e5d or later - which would identify itself as eXist version 3.0.3. Until a newer nightly build is available or you build yourself from source, the package will not appear in the list of available packages in the Dashboard when running eXist 3.0.2 or earlier. Even if you manually download the package from the Public Repo's page at http://demo.exist-db.org/exist/apps/public-repo/index.html (which lists all packages, and doesn't filter these to just those installable on your version of eXist), eXist 3.0.2 or earlier will reject the package.

@wolfgangmm In my tests just now, the installation in this scenario (using a recent but pre-3.0.3 nightly) silently fails; the server's dashboard/modules/install.xql service returns [{ "error" : null }] but the Package Manager doesn't report any problem. exist.log does report the error - but this error isn't passed back to Dashboard:

2017-01-11 12:41:15,784 [qtp158309733-58] ERROR (Deploy.java [installAndDeployFromDb]:215) - Package requires eXistdb version > 3.0.3. Installed version is 3.0.2 org.expath.pkg.repo.PackageException: Package requires eXistdb version > 3.0.3. Installed version is 3.0.2 at org.exist.repo.Deployment.checkProcessorVersion(Deployment.java:296) ~[exist.jar:?] at org.exist.repo.Deployment.installAndDeploy(Deployment.java:221) ~[exist.jar:?] at org.exist.repo.Deployment.installAndDeploy(Deployment.java:167) ~[exist.jar:?] at org.exist.xquery.modules.expathrepo.Deploy.installAndDeployFromDb(Deploy.java:213) [exist-modules.jar:?] at org.exist.xquery.modules.expathrepo.Deploy.eval(Deploy.java:169) [exist-modules.jar:?] ...

@adamretter It appears the nightly builds have fallen behind. The last available build there is dated Jan 8, but there have been commits to develop since then, according to https://github.com/eXist-db/exist/commits/develop.

emmamorlock commented 7 years ago

Thanks again. I tried two things: bu

  1. ilt tei-publisher-lib and tei-publisher-app, put the .xar in the autodeploy of my previously installed nighthly build d555767 from 2017-01-08
  2. installed the last develop version of yesterday evening (3.0.RC2-:develop-0b72073-20170111).

In 2. the tei-publisher lib and add were in the package manager as described. I got apparently the same error in both 1. and 2. after clicking on the tei-publisher icon in the dashboard:

/db/apps/tei-publisher/modules/view.xql exerr:ERROR XPTY0004: The actual cardinality for parameter 2 does not match the cardinality declared in the function's signature: i18n:process($node as node(), $selectedCatalogue as node()) item()*. Expected cardinality: exactly one, got 0. [at line 46, column 34, source: /db/apps/tei-publisher/modules/lib/i18n.xql]In function: i18n:process(node(), node()) [46:13:/db/apps/tei-publisher/modules/lib/i18n.xql] i18n:process(node()*, xs:string?, xs:string, xs:string?) [29:9:/db/apps/tei-publisher/modules/lib/i18n.xql] intl:translate(node(), map, xs:string?, xs:string?) [221:18:/db/apps/tei-publisher/modules/lib/i18n-templates.xql] templates:call-with-args(function, function*, element(), map) [208:13:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process-output(element(), map, item()*, element()) [205:9:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:call-by-introspection(element(), map, map, function) [187:28:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:call(item(), element(), map) [135:36:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process(node()*, map) [131:51:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process(node()*, map) [433:9:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process-output(element(), map, item()*) [270:9:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process-output(element(), map, item()*, element()) [205:9:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:call-by-introspection(element(), map, map, function) [187:28:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:call(item(), element(), map) [135:36:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process(node()*, map) [146:81:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process(node()*, map) [146:81:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process(node()*, map) [547:9:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] pages:app-root(node(), map) [217:18:/db/apps/tei-publisher/modules/lib/pages.xql] templates:call-with-args(function, function*, element(), map) [208:13:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process-output(element(), map, item()*, element()) [205:9:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:call-by-introspection(element(), map, map, function) [187:28:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:call(item(), element(), map) [135:36:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process(node()*, map) [462:17:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process-output(element(), map, item()*) [270:9:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process-output(element(), map, item()*, element()) [205:9:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:call-by-introspection(element(), map, map, function) [187:28:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:call(item(), element(), map) [143:37:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process(node()*, map) [131:51:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:process(node()*, map) [88:9:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql] templates:apply(node()+, function, map?, map?) [49:5:/Users/emorlock/Github-projects/exist/webapp/WEB-INF/data/expathrepo/shared-0.4.0/content/templates.xql]

In the logs of 2. I found some error messages:

2017-01-12 09:01:37,931 [AWT-EventQueue-0] ERROR (Configuration.java [lookupModuleClass]:448) - Configuration problem: class not found for module 'http://exist-db.org/xquery/jndi' (ClassNotFoundException); class:'org.exist.xquery.modules.jndi.JNDIModule'; message:'org.exist.xquery.modules.jndi.JNDIModule'

2017-01-12 09:01:39,156 [Thread-3] ERROR (Configuration.java [lookupModuleClass]:448) - Configuration problem: class not found for module 'http://exist-db.org/xquery/jndi' (ClassNotFoundException); class:'org.exist.xquery.modules.jndi.JNDIModule'; message:'org.exist.xquery.modules.jndi.JNDIModule'

2017-01-12 09:01:40,397 [Thread-3] ERROR (Configurator.java [configureByCurrent]:510) - Could not insert configured object 2017-01-12 09:01:40,399 [Thread-3] ERROR (Configurator.java [configureByCurrent]:557) - Field 'managers' must have '@org.exist.config.annotation.ConfigurationFieldClassMask' annotation [manager], skipping instance creation.

2017-01-12 09:01:43,547 [Thread-3] WARN (JettyStart.java [run]:234) - Could not find OpenID extension. OpenID will be disabled! 2017-01-12 09:01:43,548 [Thread-3] WARN (JettyStart.java [run]:241) - Could not find OAuthServlet extension. OAuth will be disabled!

wolfgangmm commented 7 years ago

@emmamorlock I guess this happens because your browser reports a French locale and tei-publisher lacks a translation file for French. http://gitlab.exist-db.org/tei-publisher/tei-publisher-app/commit/a61b2095d1ca7ff0bdc9480a82bc93247a191641 should fix it and fall back to English.

Sorry for the trouble, but I just recently added i18n support and it's good you found the issue. I will update the packages available via the dashboard as well.

You could actually help by writing a i18n translation file: just copy http://gitlab.exist-db.org/tei-publisher/tei-publisher-app/blob/master/templates/basic/resources/i18n/collection-en.xml and edit it to support French ;-)

emmamorlock commented 7 years ago

Here it is... not perfect but clear enough I guess...

<catalogue xml:lang="fr">
<msg key="home">Accueil</msg>
<msg key="download">Télécharger</msg>
<msg key="pdf-fo">PDF (version XSL-FO)</msg>
<msg key="pdf-title">Télécharger au format PDF</msg>
<msg key="fo-source">Source XSL-FO</msg>
<msg key="pdf-latex">PDF (version LaTeX)</msg>
<msg key="latex-source">Source TeX</msg>
<msg key="single-page">Page unique</msg>
<msg key="epub-download">Télécharger un ebook au format ePub</msg>
<msg key="view-tei">Voir au format TEI XML</msg>
<msg key="plain">Page unique</msg>
<msg key="admin">Admin</msg>
<msg key="recompile">Recompiler l'ODD</msg>
<msg key="metadata-update">Mettre à jour l'index des métadonnées</msg>
<msg key="edit-odd">Modifier l'ODD</msg>
<msg key="edit-styles">Modifier les styles CSS</msg>
<msg key="edit-config">Modifier les paramètres configuration</msg>
<msg key="login">Se connecter</msg>
<msg key="logout">Se déconnecter</msg>
<msg key="user">Utilisateur</msg>
<msg key="password">Mot de passe</msg>
<msg key="search-sections">Rechercher dans l'ensemble du texte</msg>
<msg key="search-headings">Rechercher dans les titres de sections</msg>
<msg key="upload-files">Envoyer les fichiers TEI XML ou ODD dans le jeu de documents de test. Cliquer sur le bouton ci-dessous ou glisser-déposer les fichiers dessus.</msg>
<msg key="select-files">Sélectionner les fichiers...</msg>
<msg key="upload">Envoi de fichier</msg>
<msg key="uploaded-files">Fichiers envoyés</msg>
<msg key="search-query-attr">Chercher quoi ?</msg>
<msg key="search-part">Chercher quelle partie de document ?</msg>
<msg key="documents">Documents</msg>
<msg key="browse-author">Auteur</msg>
<msg key="browse-title">Titre</msg>
<msg key="browse-filename">Nom de fichier</msg>
<msg key="browsing">Parcourir</msg>
<msg key="login-message">Merci de vous connecter avant l'envoi de documents !</msg>
<msg key="contents">Contenus</msg>
<msg key="previous-page">Page précédente [flèche gauche du clavier</msg>
<msg key="next-page">Page suivante [flèche droite du clavier]</msg>
<msg key="close">Fermer</msg>
<msg key="generating-file">Génération du fichier...</msg>
<msg key="download-message">La génération d'un fichier pour le téléchargement peut prendre quelques minutes. Merci de patienter. Cette boîte de dialogue se fermera automatiquement à la fin du téléchargement.</msg>
<msg key="search-results">Résultats de la recherche</msg>
<msg key="found">Trouvé</msg>
<msg key="view-switch">Permuter entre les vues "Page" et "Division"</msg>
<msg key="documentation">Documentation</msg>
<msg key="app-generator">Générateur d'applications</msg>
<msg key="presentation">Présentation</msg>
<msg key="examples">Exemples</msg>
</catalogue>
emmamorlock commented 7 years ago

Hi I was able to install tei publisher with the french i18n support file. I made some changes to it seeing things in the context of the app. Not knowing how to submit the file from my clone of the gilab repo, I put it there: https://github.com/emmamorlock/varia

wolfgangmm commented 7 years ago

Hi,

thanks a lot. I committed your file to http://gitlab.exist-db.org/tei-publisher/tei-publisher-app/commit/56fe9ddce8c08143b676ec3f4eb2a4b848fb2e2a