Bug #3380

TXM 0.8.3, XTZ Import, 1-split-merge and 4-edition XSL steps broken

Ajouté par Alexey Lavrentev il y a plus de 2 ans. Mis à jour il y a plus d'un an.

Statut:Closed Début:27/04/2023
Priorité:Normal Echéance:
Assigné à:- % réalisé:

100%

Catégorie:Import Temps passé: -
Version cible:TXM 0.8.3

Description

TXM RCP 0.8.3.202304121142
System: Ubuntu 20.04

Testing corpora:
  1. [Sharedocs] Cactus/Projets/JournauxFrancophones/TXM 0.8.3 Testing/davydovachron-fr-txm080/
  2. [Sharedocs] HRIM Data/Pole HN/EThAP 2023/Ethap 2023 - Fichiers/Jour_2/Exercices_corr/JOUBERT
It looks like the XSL transformations using the result-document output channel are not working:
  • No files are transmitted via split-merge (1st example)
  • *-pager.xsl transformation fails (2nd example)

Both corpora are correctly imported via TXM 0.8.2

1st example

Le corpus DAVYDOVACHRON-FR-TXM080 sera créé à partir du dossier /home/alavrent/xml/davydovachron-fr-txm080.
Le paramètre d'importation 'annotate' est activé par défaut car l'extensionTreeTagger est installée.
Restauration des paramètres d'importation à partir du fichier de paramètres import.xml.
Sauvegarde des paramètres d'importation…
Compiling the "xtz" import module scripts...
Démarrage du module d'import "xtz"...
Import du corpus...
-- IMPORTER - Reading source files
-- Split-Merge XSL Step with /home/alavrent/xml/davydovachron-fr-txm080/xsl/1-split-merge
-- Applying /home/alavrent/xml/davydovachron-fr-txm080/xsl/1-split-merge/txm-merge-and-split-davydova.xsl XSL to 8 files with parameters: {output-directory=file:/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/split/}
  8 .

-- Front XSL Step with the /home/alavrent/xml/davydovachron-fr-txm080/xsl/2-front directory.
-- Applying '/home/alavrent/xml/davydovachron-fr-txm080/xsl/2-front/1-remove-seg.xsl' XSL to 0 files from  directory '/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/split' with parameters: {output-directory=file:/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080/} result written in '/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080'

-- Applying '/home/alavrent/xml/davydovachron-fr-txm080/xsl/2-front/2-merge-adjacent-elements.xsl' XSL to 0 files from  directory '/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080' with parameters: {output-directory=file:/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080/} result written in '/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080'

-- Applying '/home/alavrent/xml/davydovachron-fr-txm080/xsl/2-front/3-merge-adjacent-elements-pass2.xsl' XSL to 0 files from  directory '/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080' with parameters: {output-directory=file:/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080/} result written in '/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080'

-- Applying '/home/alavrent/xml/davydovachron-fr-txm080/xsl/2-front/4-txm-filter-teip5-og-xtz-davydova.xsl' XSL to 0 files from  directory '/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080' with parameters: {output-directory=file:/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080/} result written in '/home/alavrent/TXM-0.8.3/corpora/DAVYDOVACHRON-FR-TXM080/txm/DAVYDOVACHRON-FR-TXM080'

-- Checking XML-TEI files for well-formedness.
No XML file (*.xml) to process. Aborting
Error while importing corpus during 'importer' step, reason=not set.

2nd example

Applying /home/alavrent/Documents/Enseignement/EThAP 2023/Jour_2/Exercices_corr/JOUBERT/xsl/4-edition/2-default-pager.xsl XSL to 2 files with parameters: {output-directory=file:/home/alavrent/TXM-0.8.3/corpora/JOUBERT-TEST-CORR/HTML/JOUBERT-TEST-CORR/default/, number-words-per-page=1000, import-xml-path=/home/alavrent/TXM-0.8.3/corpora/JOUBERT-TEST-CORR, pagination-element=pb}
  2 .Error in xsl:result-document/@href on line 211 column 97 of 2-default-pager.xsl:
  XTDE1480  Cannot execute xsl:result-document while evaluating xsl:variable
     invoked by xsl:for-each-group at file:/home/alavrent/Documents/Enseignement/EThAP%202023/Jour_2/Exercices_corr/JOUBERT/xsl/4-edition/2-default-pager.xsl#207
  In template rule with match="*[a[xs:string(@class) eq "txm-page"]]" on line 203 of 2-default-pager.xsl
     invoked by xsl:apply-templates at file:/home/alavrent/Documents/Enseignement/EThAP%202023/Jour_2/Exercices_corr/JOUBERT/xsl/4-edition/2-default-pager.xsl#85
     invoked by xsl:for-each at file:/home/alavrent/Documents/Enseignement/EThAP%202023/Jour_2/Exercices_corr/JOUBERT/xsl/4-edition/2-default-pager.xsl#84
  In template rule with match="html/body" on line 76 of 2-default-pager.xsl
     invoked by xsl:apply-templates at file:/home/alavrent/Documents/Enseignement/EThAP%202023/Jour_2/Exercices_corr/JOUBERT/xsl/4-edition/2-default-pager.xsl#177
at template groupbypb on line 160 column 34 of 2-default-pager.xsl:
     invoked by xsl:for-each at file:/home/alavrent/Documents/Enseignement/EThAP%202023/Jour_2/Exercices_corr/JOUBERT/xsl/4-edition/2-default-pager.xsl#175
at template groupbypb on line 160 column 34 of 2-default-pager.xsl:
     invoked by xsl:for-each-group at file:/home/alavrent/Documents/Enseignement/EThAP%202023/Jour_2/Exercices_corr/JOUBERT/xsl/4-edition/2-default-pager.xsl#163
at template groupbypb on line 160 column 34 of 2-default-pager.xsl:
     invoked by xsl:call-template at file:/home/alavrent/Documents/Enseignement/EThAP%202023/Jour_2/Exercices_corr/JOUBERT/xsl/4-edition/2-default-pager.xsl#148
at template checkpb on line 139 column 32 of 2-default-pager.xsl:
     invoked by xsl:call-template at file:/home/alavrent/Documents/Enseignement/EThAP%202023/Jour_2/Exercices_corr/JOUBERT/xsl/4-edition/2-default-pager.xsl#97
  In template rule with match="*" on line 96 of 2-default-pager.xsl
     invoked by built-in template rule (text-only)
Exception in thread "XTZ Pager - JOUBERT" ; SystemID: file:/home/alavrent/Documents/Enseignement/EThAP%202023/Jour_2/Exercices_corr/JOUBERT/xsl/4-edition/2-default-pager.xsl; Line#: 211; Column#: 97
net.sf.saxon.trans.XPathException: Cannot execute xsl:result-document while evaluating xsl:variable
    at net.sf.saxon.expr.instruct.ResultDocument.checkNotTemporaryOutputState(ResultDocument.java:509)
    at net.sf.saxon.expr.instruct.ResultDocument.process(ResultDocument.java:385)
    at net.sf.saxon.expr.instruct.ResultDocument.processLeavingTail(ResultDocument.java:380)
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:755)
    at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:943)
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:142)
    at net.sf.saxon.expr.instruct.ForEachGroup.processLeavingTail(ForEachGroup.java:614)
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:755)
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:142)
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:357)
    at net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:437)
    at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:392)
    at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:551)
    at net.sf.saxon.expr.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavingTail(ApplyTemplates.java:634)
    at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:362)
    at net.sf.saxon.expr.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.java:299)
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:755)
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:142)
    at net.sf.saxon.expr.instruct.ForEach.lambda$processLeavingTail$0(ForEach.java:531)
    at net.sf.saxon.om.SequenceTool.supply(SequenceTool.java:147)
    at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:531)
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:142)
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:357)
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:298)
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:755)
    at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:943)
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:142)
    at net.sf.saxon.expr.instruct.ForEachGroup.processLeavingTail(ForEachGroup.java:614)
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:755)
    at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:266)
    at net.sf.saxon.expr.instruct.CallTemplate.process(CallTemplate.java:384)
    at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:302)
    at net.sf.saxon.expr.instruct.DocumentInstr.evaluateItem(DocumentInstr.java:45)
    at net.sf.saxon.expr.parser.Evaluator$SingleItem.evaluate(Evaluator.java:179)
    at net.sf.saxon.expr.parser.Evaluator$SingleItem.evaluate(Evaluator.java:167)
    at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:554)
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:746)
    at net.sf.saxon.expr.instruct.Choose.processLeavingTail(Choose.java:943)
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:755)
    at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:266)
    at net.sf.saxon.expr.instruct.CallTemplate$CallTemplatePackage.processLeavingTail(CallTemplate.java:561)
    at net.sf.saxon.trans.rules.TextOnlyCopyRuleSet.process(TextOnlyCopyRuleSet.java:74)
    at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:524)
    at net.sf.saxon.trans.XsltController.applyTemplates(XsltController.java:685)
    at net.sf.saxon.s9api.AbstractXsltTransformer.applyTemplatesToSource(AbstractXsltTransformer.java:421)
    at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:353)
    at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:75)
    at org.txm.importer.ApplyXsl2.process(ApplyXsl2.java:309)
    at org.txm.importer.ApplyXsl2.processImportSources(ApplyXsl2.java:517)
    at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:318)
    at org.txm.scripts.importer.xtz.XTZPager.doPostEditionXSLStep(XTZPager.groovy:424)
    at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:318)
    at org.txm.scripts.importer.xtz.XTZPager.process(XTZPager.groovy:72)
    at org.txm.importer.xtz.ImportModule$2.run(ImportModule.java:242) 

Solution

During the importer step, in the split-merge XSL : the function in Saxon 11 (see https://www.saxonica.com/html/documentation12/functions/fn/document-uri.html). This function was used to retrieve files testing their names. The solution is to add "stable=yes" to the URI of collection.

During the XSL pager step, in the Edition+Merge XSL : calling xsl:result-document while evaluating a xsl:variable is forbidden (or the XSL test fails). Move the first pass of the split XSL in the edition XSL

Historique

#1 Mis à jour par Alexey Lavrentev il y a plus de 2 ans

  • Sujet changé de TXM 0.8.3, XTZ Import, 1-split-merge ans 4-edition steps broken à TXM 0.8.3, XTZ Import, 1-split-merge and 4-edition XSL steps broken

#2 Mis à jour par Serge Heiden il y a plus de 2 ans

  • Description mis à jour (diff)

#3 Mis à jour par Alexey Lavrentev il y a plus de 2 ans

UPDATE:

As far *-pager.xsl transformation is concerned, the problem can be reproduced with Oxygen 25 / Saxon 11.4. It may be related to the "streaming" processing mode, but this mode should only be available in Saxon EE and its desactivation in Oxygen has no effect on the error message.

Further investigation is necessary to see whether it is a Saxon bug or a more strict implementation of the norm.

As a work-around, the 1st pass of the pagination algorithm may be executed at the -html step. A new version of 1-default-html and 2-default-pager stylesheets will be provided.

The problem with 1-split-merge transformation is different.

#4 Mis à jour par Alexey Lavrentev il y a plus de 2 ans

  • % réalisé changé de 0 à 80

The problem with the split-merge step of Davydova corps is due to the change of the document-uri() function in Saxon 11 (see https://www.saxonica.com/html/documentation12/functions/fn/document-uri.html). This function was used to retrieve files testing their names.

The solution is to add "stable=yes" to the URI of collection.

#5 Mis à jour par Matthieu Decorde il y a plus de 2 ans

  • Description mis à jour (diff)

#6 Mis à jour par Sebastien Jacquot il y a plus d'un an

  • % réalisé changé de 80 à 100

#7 Mis à jour par Sebastien Jacquot il y a plus d'un an

  • Statut changé de New à Closed

Formats disponibles : Atom PDF