Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenLocalizedWebPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenLocalizedWebPage.java	(revision 1653)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/OpenLocalizedWebPage.java	(revision 1654)
@@ -138,7 +138,7 @@
 			return OpenBrowser.openfile(getValidURL(URL_TEXTOMETRIE+"html/doc/manual/"+version+"/"+locale+"/manual1.xhtml", 
 					URL_TEXTOMETRIE+"html/doc/manual/"+version+"/en/manual1.xhtml")); //$NON-NLS-1$
 		} else if (PDFREFMAN.equals(key)) {
-			return OpenBrowser.openfile(URL_TEXTOMETRIE+"files/documentation/Manuel%20de%20TXM%200.7%20FR.pdf/download"); //$NON-NLS-1$ 
+			return OpenBrowser.openfile(URL_TEXTOMETRIE+"files/documentation/Manuel%20de%20TXM%200.8%20FR.pdf"); //$NON-NLS-1$ 
 		} else if (BUG.equals(key)) {
 			if (locale.equals("fr")) { //$NON-NLS-1$
 				return OpenBrowser.openfile("https://groupes.renater.fr/wiki/txm-users/public/retours_de_bugs_logiciel"); //$NON-NLS-1$
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportFormEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportFormEditor.java	(revision 1653)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/ImportFormEditor.java	(revision 1654)
@@ -68,6 +68,8 @@
 
 	/** The meta. */
 	MetadataPage meta;
+
+	private ImportFormEditorInput finput;
 	
 	/**
 	 * Instantiates a new import form editor.
@@ -121,9 +123,9 @@
 	throws PartInitException {
 		setSite(site);
 		setInput(input);
-		
+		finput = ((ImportFormEditorInput) input);
 		String txmhome = Toolbox.getTxmHomePath();
-		File f = ((ImportFormEditorInput) input).getGroovyFile();
+		File f = finput.getGroovyFile();
 		String filepath = f.getPath();
 		this.setGroovyscript(new File(txmhome, filepath));
 		
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 1653)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/CorpusPage.java	(revision 1654)
@@ -71,8 +71,10 @@
 import org.txm.rcp.editors.imports.sections.TextualPlansSection;
 import org.txm.rcp.editors.imports.sections.TokenizerSection;
 import org.txm.rcp.editors.imports.sections.UISection;
+import org.txm.rcp.handlers.results.DeleteObject;
 import org.txm.rcp.handlers.scripts.ExecuteImportScript;
 import org.txm.rcp.messages.TXMUIMessages;
+import org.txm.rcp.utils.SWTEditorsUtils;
 import org.txm.utils.AsciiUtils;
 import org.txm.utils.logger.Log;
 import org.w3c.dom.Element;
@@ -894,7 +896,13 @@
 	 */
 	public boolean saveConfig() {
 		Log.info(TXMUIMessages.savingImportParameters);
-
+		
+		if (project == null || project.getRCPProject() == null || !project.getRCPProject().exists()) {
+			Log.warning("The corpus has been deleted since. Please re-open the import form.");
+			this.getEditor().close(false);
+			return false;
+		}
+		
 		//		params.rootDir = project.getSrcdir().getAbsolutePath();
 		//		project.scriptFile = editor.getGroovyScript().getName();
 
@@ -1019,6 +1027,9 @@
 		project.setDirty();
 		project.setDoUpdate(false);
 		project.setNeedToBuild();
+		
+		DeleteObject.closeEditorOf(project, true);
+		
 		ExecuteImportScript.executeScript(project);
 
 	}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/DeleteObject.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/DeleteObject.java	(revision 1653)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/handlers/results/DeleteObject.java	(revision 1654)
@@ -219,7 +219,7 @@
 
 						//close corresponding editors
 						for(Object obj : allObjectDeleted) {
-							closeEditorOf(obj);
+							closeEditorOf(obj, false);
 						}
 					} catch(Exception e) {
 					}
@@ -305,16 +305,20 @@
 	 * Close the editors which uses an Object.
 	 *
 	 * @param o the object used by an editor
+	 * @param childnre close the editors of children too
 	 */
-	public static void closeEditorOf(Object o) {
-
+	public static void closeEditorOf(Object o, boolean children) {
+		if (!(o instanceof TXMResult)) {
+			return;
+		}
+		
 		TXMResult r = (TXMResult) o;
 		List<TXMResult> all = new ArrayList<TXMResult>();//r.getDeepChildren();
 		all.add(r);
-
+		if (children) {
+			all.addAll(r.getDeepChildren());
+		}
 		ArrayList<TXMEditor> editors = SWTEditorsUtils.getEditors();
-
-		//FIXME use SWTEditorsUtils.getEditors()
 		for (TXMResult tr : all) { // close editors of the result and its children
 			for (TXMEditor<?> editor : editors) {
 				if (tr == editor.getResult())	{
Index: tmp/org.txm.libs.cqp.win32/res/win64/cqpserver.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.libs.cqp.win32/res/win64/cwb-decode.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.libs.cqp.win32/res/win64/cqpjni.dll
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.libs.cqp.win32/res/win64/cwb-align-encode.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.libs.cqp.win32/res/win64/cwb-makeall.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.libs.cqp.win32/res/win64/cqp.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.libs.cqp.win32/res/win64/cwb-align.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.libs.cqp.win32/res/win64/cwb-encode.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1653)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1654)
@@ -1516,6 +1516,14 @@
 	}
 
 	/**
+	 * Deletes all the children
+	 * @return
+	 */
+	public void deleteChildren() {
+		deleteChildren(null);
+	}
+	
+	/**
 	 * Deletes the children of the specified class.
 	 * @param type
 	 * @return
Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-posttok-structure2wordAtt.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-posttok-structure2wordAtt.xsl	(revision 0)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-posttok-structure2wordAtt.xsl	(revision 1654)
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xd="http://www.pnp-software.com/XSLTdoc">
+  
+  <xd:doc type="stylesheet">
+    <xd:short>
+      This stylesheet projects the number of nesting selected ancestor 
+      elements to attributes of the w element.
+      Designed for 3-posttok step of the XTZ + CSV TXM import module.
+      Enter element names separated by | as the value of 
+      elementsToProject parameter.
+    </xd:short>
+    <xd:detail>
+      This stylesheet is free software; you can redistribute it and/or
+      modify it under the terms of the GNU Lesser General Public
+      License as published by the Free Software Foundation; either
+      version 3 of the License, or (at your option) any later version.
+      
+      This stylesheet is distributed in the hope that it will be useful,
+      but WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Lesser General Public License for more details.
+      
+      You should have received a copy of GNU Lesser Public License with
+      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+    </xd:detail>
+    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+    <xd:copyright>2018, CNRS / UMR 5317 IHRIM (CACTUS research group)</xd:copyright>
+  </xd:doc>
+  
+  <!-- List elements to count and project here -->
+  <xsl:param name="elementsToProject">q|quote</xsl:param>
+  
+  <!-- Whenever you match any node or any attribute -->
+  <xsl:template match="node()|@*">
+    <!-- Copy the current node -->
+    <xsl:copy>
+      <!-- Including any attributes it has and any child nodes -->
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+  <xsl:template match="*:w">
+    <xsl:variable name="ancestors">
+      <ancestors>
+        <xsl:for-each select="ancestor::*">
+          <xsl:copy/>
+        </xsl:for-each>
+      </ancestors>
+    </xsl:variable>
+    <xsl:copy>
+      <xsl:apply-templates select="@*"/>
+      <xsl:for-each select="tokenize($elementsToProject,'\|')">
+        <xsl:variable name="elementName"><xsl:value-of select="."/></xsl:variable>
+        <xsl:attribute name="{$elementName}">
+          <xsl:choose>
+            <xsl:when test="$ancestors//*[local-name(.)=$elementName]">
+              <xsl:number value="count($ancestors//*[local-name()=$elementName])"></xsl:number>
+            </xsl:when>
+            <xsl:otherwise>0</xsl:otherwise>
+          </xsl:choose>
+        </xsl:attribute>
+      </xsl:for-each>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+  
+</xsl:stylesheet>

Property changes on: tmp/org.txm.core/res/org/txm/xml/xsl/txm-posttok-structure2wordAtt.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-rename-files-no-dots.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-rename-files-no-dots.xsl	(revision 0)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-rename-files-no-dots.xsl	(revision 1654)
@@ -0,0 +1,55 @@
+<!-- The Identity Transformation -->
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xd="http://www.pnp-software.com/XSLTdoc">
+
+  <xd:doc type="stylesheet">
+    <xd:short>
+      This stylesheet is designed for TXM XTZ+CSV import module to replace
+      dots with underscores in source file names. (A bug in TXM 0.7.8 prevents
+      files containing dots in their names from being imported). This stylesheet
+      should be used at "1-split-merge" step. See TXM User Manual for more
+      details (http://textometrie.ens-lyon.fr/spip.php?rubrique64)
+    </xd:short>
+    <xd:detail>
+      This stylesheet is free software; you can redistribute it and/or
+      modify it under the terms of the GNU Lesser General Public
+      License as published by the Free Software Foundation; either
+      version 3 of the License, or (at your option) any later version.
+      
+      This stylesheet is distributed in the hope that it will be useful,
+      but WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Lesser General Public License for more details.
+      
+      You should have received a copy of GNU Lesser Public License with
+      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+    </xd:detail>
+    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+    <xd:copyright>2017, CNRS / UMR 5317 IHRIM (CACTUS research group)</xd:copyright>
+  </xd:doc>
+
+<xsl:param name="output-directory">
+  <xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.[^/.]+$">
+    <xsl:matching-substring>
+      <xsl:value-of select="regex-group(1)"/>
+    </xsl:matching-substring>
+  </xsl:analyze-string>
+</xsl:param>
+
+  <xsl:variable name="filename">
+    <xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.[^/.]+$">
+      <xsl:matching-substring>
+        <xsl:value-of select="regex-group(2)"/>
+      </xsl:matching-substring>
+    </xsl:analyze-string>
+  </xsl:variable>
+
+<xsl:template match="/">
+  <xsl:result-document href="{$output-directory}/{replace($filename,'\.','_')}.xml">
+    <xsl:copy-of select="."></xsl:copy-of>
+  </xsl:result-document>
+  <warning>Result file written to <xsl:value-of select="concat($output-directory,'/',replace($filename,'\.','_'),'.xml')"/></warning>
+</xsl:template>
+
+
+</xsl:stylesheet>

Property changes on: tmp/org.txm.core/res/org/txm/xml/xsl/txm-rename-files-no-dots.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/res/org/txm/xml/xsl/filter-number-act-scene-line.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/filter-number-act-scene-line.xsl	(revision 0)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/filter-number-act-scene-line.xsl	(revision 1654)
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xd="http://www.pnp-software.com/XSLTdoc" version="2.0">
+ 
+  <xd:doc type="stylesheet">
+    <xd:short>
+      Feuille de style de numérotation d'éléments pouvant être utilisée comme
+      prétraitement de l'import XML/w+CSV. Elle est conçue pour numéroter les
+      actes, scènes et lignes de l'édition XML de la pièce "All's Well That Ends Well"
+      de William Shakespeare suivante https://www.ibiblio.org/xml/examples/shakespeare/all_well.xml
+    </xd:short>
+    <xd:detail>
+      This stylesheet is free software; you can redistribute it and/or
+      modify it under the terms of the GNU Lesser General Public
+      License as published by the Free Software Foundation; either
+      version 3 of the License, or (at your option) any later version.
+      
+      This stylesheet is distributed in the hope that it will be useful,
+      but WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Lesser General Public License for more details.
+      
+      You should have received a copy of GNU Lesser Public License with
+      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+    </xd:detail>
+    <xd:author>Serge Heiden slh@ens-lyon.fr</xd:author>
+    <xd:copyright>2015, ENS de Lyon / UMR 5191 ICAR (Cactus)</xd:copyright>
+  </xd:doc>
+
+  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes" indent="yes"/>
+
+  <xsl:template match="@*|node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+  <xsl:template match="ACT|SCENE">
+   <xsl:copy>
+		<xsl:attribute name="n">
+			<xsl:number level="multiple" format="I.I" count="ACT|SCENE"/>
+		</xsl:attribute>
+    	<xsl:apply-templates select="@*|node()"/>
+   </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="LINE">
+   <xsl:copy>
+		<xsl:attribute name="n">
+			<xsl:number level="any" format="1" count="LINE" from="SCENE"/>
+		</xsl:attribute>
+    	<xsl:apply-templates select="@*|node()"/>
+   </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>
+

Property changes on: tmp/org.txm.core/res/org/txm/xml/xsl/filter-number-act-scene-line.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/res/org/txm/xml/xsl/README.markdown
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/README.markdown	(revision 0)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/README.markdown	(revision 1654)
@@ -0,0 +1,161 @@
+# TXM XSLT IMPORT FILTERS LIBRARY
+
+This is a collection of XSLT (1.0 or 2.0) stylesheets that can be used to prepare various types of XML documents for import into TXM. Place them in the appropriate xsl/step subfolder when using XTZ+CSV import module or use "Front XSLT" option in the import parameters interface to select the appropriate filter in the XML/W+CSV import module.
+
+Filters are usually named according to the following pattern:
+	txm-filter-[input format]-[import module]\(-[option])?
+
+## Stylesheets for use with the XTZ+CSV import module
+
+### 1-split-merge step
+
+Due to a bug in TXM 0.7.8 and 0.7.9, this processing step is not working properly. The stylesheets mentioned below must be applied prior to the import using ExecXSL macro or any other XSLT 2.0 processor.
+
+#### txm-rename-files-no-dots.xsl
+This stylesheet is designed for TXM XTZ+CSV import module to replace dots with underscores in source file names. (A bug in TXM 0.7.8 prevented
+files containing dots in their names from being imported, this bug has been resolved in TXM 0.7.9).
+
+#### txm-split-teicorpus.xsl
+This stylesheet may be used to split a single file containing a teiCorpus into individual files for each TEI child.
+
+### 2-front step
+
+#### txm-front-teiHeader2textAtt.xsl
+
+This stylesheet may be customized to extract metadata from teiHeader and create corresponding attributes of the text element.
+
+### 3-posttok step
+
+#### txm-posttok-addRef.xsl
+
+This stylesheet may be customized to add a ref attribute to w elements which will be used as a default reference in TXM concordances.
+
+#### txm-posttok-unbreakWords.xsl
+
+This stylesheet may be customized to re-unite the words broken in the primary tokenization process (due to line or page breaks, for instance)
+
+### txm-posttok-structure2wordAtt.xsl
+
+This stylesheet projects the number of nesting selected ancestor elements to attributes of the w element.Enter element names separated by | as the value of elementsToProject parameter.
+
+### 4-edition step
+
+#### 1-default-html.xsl
+
+This is an alternative stylesheet for creating default editions with the XTZ module. It transforms every TEI element into an HTML span with @class. This stylesheet must be used in conjunction with 2-default-pager.xsl.
+
+#### 2-defaut-pager.xsl
+
+This stylesheet must be used in conjunction with 1-default-html.xsl to create edition pages.
+
+## Basic stylesheets for filtering XML sources
+
+###  filter-keep-only-select.xsl
+
+This stylesheet may be customized to filter out all the text and tags except the content of the specified element (select by default) and its ancestors.
+
+### filter-out-p.xsl
+
+This stylesheet may be customized to filter out any particular xml element (p by default) and its content from the source document.
+
+### filter-out-sp.xsl
+
+This stylesheet may be customized to filter out any particular xml element with a specific attribute value (sp with an attribute who with the value 'enqueteur' by default) and its content from the source document.
+
+## Basic stylesheets for adapting XML TEI P5 sources
+
+### txm-filter-teip5-teibfm.xsl
+
+This stylesheet may be customized for use with any TEI P5 in the TEI BFM import module. Note that this module is experimental and may fail on documents that do not follow BFM encoding guidelines.
+
+### txm-filter-teip5-xmlw-preserve.xsl
+
+This stylesheet may be customized for use with any TEI P5 in the XML/w+CSV import module. By default, it eliminates teiHeader and facsimile elements and their contents and preserves all other elements.
+
+### txm-filter-teip5-xmlw-simplify.xsl
+
+This stylesheet may be customized for use with any TEI P5 in the XML/W+CSV import module. By default, it eliminates teiHeader, facsimile and all note elements and their contents and filters out all tags in the text body except ab, body, div, front, lb, p, pb, s, TEI, text and w.
+
+## Additional stylesheets for particular corpora
+
+### p4top5_perseus.xsl
+
+This stylesheet is needed to convert Perseus TEI P4 files to TEI P5 prior to any import process.
+
+### txm-edition-page-split.xsl
+
+This styleheet should be used to create separate HTML pages for TXM editions.
+
+### txm-edition-xmltxm-textgrid.xsl
+
+This styleheet should be used to customize TXM editions of DARIAH-DE Textgrid texts.
+
+### txm-edition-xtz-corpusakkadien-translit.xsl
+
+This stylesheet should be used to customize translitterated TXM editions of cuneiform Akkadian tablets, see [the project wiki](https://groupes.renater.fr/wiki/txm-users/public/umr_proclac_corpus_akkadien#etape_3_facultative_mise_a_jour_de_l_edition_translitteree_affichage_des_sauts_de_lignes_et_de_traits_d_union_entre_les_syllabes) for more details.
+
+### txm-edition-xtz-cuneiform.xsl
+
+This stylesheet should be used to create cuneiform TXM editions of Akkadian tablets, see [the project wiki](https://groupes.renater.fr/wiki/txm-users/public/umr_proclac_corpus_akkadien#etape_3_facultative_mise_a_jour_de_l_edition_translitteree_affichage_des_sauts_de_lignes_et_de_traits_d_union_entre_les_syllabes) for more details.
+
+### txm-filter-corpusakkadien-xmlw_syllabes-cuneiform.xsl
+
+This stylesheet should be used to on a corpus of Akkadian tablets with the XML/w+CSV import module, see [the project wiki](https://groupes.renater.fr/wiki/txm-users/public/umr_proclac_corpus_akkadien#etape_3_facultative_mise_a_jour_de_l_edition_translitteree_affichage_des_sauts_de_lignes_et_de_traits_d_union_entre_les_syllabes) for more details.
+
+### txm-filter-perseustreebank-xmlw.xsl
+
+This filter should be used on the Perseus Treebank corpus texts with the XML/w+CSV import module.
+
+### txm-filter-qgraal_cm-xmlw.xsl
+
+This styleheet should be used on the diffracted format of Quest del Saint Graal source files with the XML/w+CSV import module.
+
+### txm-filter-rnc-xmlw.xsl
+
+This filter should be used on the Russian National Corpus texts with the XML/w+CSV import module.
+
+### txm-filter-teibrown-xmlw.xsl
+
+This filter should be used on the TEI Brown corpus texts with the XML/w+CSV import module.
+
+### txm-filter-teibvh-xmlw.xsl
+
+This filter should be used on the TEI BVH texts with the XML/w+CSV import module.
+
+### txm-filter-teibvh-xmlw-posttok.xsl
+
+This styleheet should be used to fix the tokenization errors and to adjust word properties in the tokenized version of TEI BVH texts.
+
+### txm-filter-teicorpustextgrid-xmlw.xsl
+
+This styleheet should be used to prepare DARIAH-DE TEIcorpus xml files to TXM XML/w+CSV import process.
+
+### txm-filter-teifrantext-teibfm.xsl
+
+This filter should be used on TEI Frantext texts with the TEI BFM import module.
+It is automatically applied in the TEI Frantext import module.
+Note that this module is experimental and may fail on documents that do not follow BFM encoding guidelines.
+
+### txm-filter-teifrantext-xmlw.xsl
+
+This styleheet should be used on TEI Frantext texts with the XML/w+CSV import module.
+
+### txm-filter-teiperseus-xmlw.xsl
+
+This filter should be used on the TEI Perseus corpus texts with the XML/w+CSV import module (after conversion to TEI P5).
+
+### txm-filter-teitextgrid-xmlw-posttok.xsl
+
+This styleheet should be used to adjust word properties in the tokenized version of DARIAH-DE Textgrid texts.
+
+### txm-front-idsHeader2textAtt.xsl
+
+This stylesheet may be used to project metadata from idsHeader (Mannheim German Language Institute corpus, IDS-XCES schema) to text attributes
+
+### txm-split-xces-ids-corpus2text.xsl
+
+This stylesheet transforms a single file of a XCES-IDS corpus (Mannheim German Language Institute corpus) into as many files as separate texts for TXM XTZ import module. Designed for 1-split-merge step, which is currently buggy. Should be applied prior to the import process.
+
+Please address any enquiries about the TXM XSLT library to
+textometrie@groupes.renater.fr
+

Property changes on: tmp/org.txm.core/res/org/txm/xml/xsl/README.markdown
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-posttok-unbreakWords.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-posttok-unbreakWords.xsl	(revision 1653)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-posttok-unbreakWords.xsl	(revision 1654)
@@ -2,52 +2,39 @@
 <xsl:stylesheet xmlns:edate="http://exslt.org/dates-and-times"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0"
   xmlns:txm="http://textometrie.org/ns/1.0"
+  xmlns:xd="http://www.pnp-software.com/XSLTdoc"
   exclude-result-prefixes="tei edate" xpath-default-namespace="http://www.tei-c.org/ns/1.0" version="2.0">
 
-  <!--
-This software is dual-licensed:
 
-1. Distributed under a Creative Commons Attribution-ShareAlike 3.0
-Unported License http://creativecommons.org/licenses/by-sa/3.0/ 
+  <xd:doc type="stylesheet">
+    <xd:short>
+      This stylesheet is designed for TXM XTZ+CSV import module to re-unite 
+      word tokens separated by lb, cb and pb tags bearing @break="no" 
+      attribute. This stylesheet should be used at "3-posttok" step.
+      All the tags separating the beginning and the end of a word must have 
+      a @break='no' and their number must not exceed 3 in each case.
+      See TXM User Manual for more details 
+      (http://textometrie.ens-lyon.fr/spip.php?rubrique64)
+    </xd:short>
+    <xd:detail>
+      This stylesheet is free software; you can redistribute it and/or
+      modify it under the terms of the GNU Lesser General Public
+      License as published by the Free Software Foundation; either
+      version 3 of the License, or (at your option) any later version.
+      
+      This stylesheet is distributed in the hope that it will be useful,
+      but WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Lesser General Public License for more details.
+      
+      You should have received a copy of GNU Lesser Public License with
+      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+    </xd:detail>
+    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+    <xd:copyright>2017, CNRS / UMR 5317 IHRIM (CACTUS research group)</xd:copyright>
+  </xd:doc>
+       
 
-2. http://www.opensource.org/licenses/BSD-2-Clause
-		
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-This software is provided by the copyright holders and contributors
-"as is" and any express or implied warranties, including, but not
-limited to, the implied warranties of merchantability and fitness for
-a particular purpose are disclaimed. In no event shall the copyright
-holder or contributors be liable for any direct, indirect, incidental,
-special, exemplary, or consequential damages (including, but not
-limited to, procurement of substitute goods or services; loss of use,
-data, or profits; or business interruption) however caused and on any
-theory of liability, whether in contract, strict liability, or tort
-(including negligence or otherwise) arising in any way out of the use
-of this software, even if advised of the possibility of such damage.
-
-     
-This stylesheet re-unites word tokens separated by lb, cb and pb tags
-bearing @break="no" attribute. Can be used with TXM XTZ import module.
-
-All the tags must have a @break='no' and their number must not exceed 3
-in each case.
-
-Written by Alexei Lavrentiev, UMR 5317 IHRIM, 2017
-  -->
-
-
   <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/> 
   
   
Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-split-xces-ids-corpus2text.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-split-xces-ids-corpus2text.xsl	(revision 0)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-split-xces-ids-corpus2text.xsl	(revision 1654)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xd="http://www.pnp-software.com/XSLTdoc">
+  
+  <xd:doc type="stylesheet">
+    <xd:short>
+      This stylesheet transforms a single file of a XCES-IDS corpus into as 
+      many files as separate texts for TXM XTZ import module
+      For more details on source corpus encoding schema see 
+      http://www1.ids-mannheim.de/kl/projekte/korpora/textmodell.html
+    </xd:short>
+    <xd:detail>
+      This stylesheet is free software; you can redistribute it and/or
+      modify it under the terms of the GNU Lesser General Public
+      License as published by the Free Software Foundation; either
+      version 3 of the License, or (at your option) any later version.
+      
+      This stylesheet is distributed in the hope that it will be useful,
+      but WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Lesser General Public License for more details.
+      
+      You should have received a copy of GNU Lesser Public License with
+      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+    </xd:detail>
+    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+    <xd:copyright>2018, CNRS / UMR 5317 IHRIM (CACTUS research group)</xd:copyright>
+  </xd:doc>
+  
+  <!-- Whenever you match any node or any attribute -->
+  <xsl:template match="node()|@*">
+    <!-- Copy the current node -->
+    <xsl:copy>
+      <!-- Including any attributes it has and any child nodes -->
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+  <xsl:param name="output-directory">
+    <xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.[^/.]+$">
+      <xsl:matching-substring>
+        <xsl:value-of select="regex-group(1)"/>
+      </xsl:matching-substring>
+    </xsl:analyze-string>
+  </xsl:param>
+  
+  <xsl:template match="/">
+    <note>Empty output. The content is transferred into result-documents</note>
+    <xsl:for-each select="descendant::idsText">
+      <xsl:variable name="filename">
+        <xsl:value-of select="substring-after(idsHeader//textSigle,'MK2')"/>
+      </xsl:variable>
+      <xsl:result-document href="{$output-directory}/{$filename}.xml">
+        <TEI>
+          <xsl:apply-templates/>
+        </TEI>
+      </xsl:result-document>
+    </xsl:for-each>
+  </xsl:template>
+  
+  
+</xsl:stylesheet>

Property changes on: tmp/org.txm.core/res/org/txm/xml/xsl/txm-split-xces-ids-corpus2text.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-edition-xtz.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-edition-xtz.xsl	(revision 1653)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-edition-xtz.xsl	(revision 1654)
@@ -15,22 +15,11 @@
                 		<xsl:otherwise>xmlw</xsl:otherwise>
                 	</xsl:choose>
                 </xsl:variable>
-	
-	<xsl:variable name="filename">
-		<xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.[^/]+$">
-			<xsl:matching-substring>
-				<xsl:value-of select="regex-group(2)"/>
-			</xsl:matching-substring>
-		</xsl:analyze-string>
-	</xsl:variable>
                 
                 <xsl:template match="/">
                 	<html>
                 		<head>
-                			<title><xsl:choose>
-                				<xsl:when test="//tei:text/@id"><xsl:value-of select="//tei:text[1]/@id"/></xsl:when>
-                				<xsl:otherwise><xsl:value-of select="$filename"/></xsl:otherwise>
-                			</xsl:choose></title>
+                			<title><xsl:value-of select="//tei:text[1]/@id"/></title>
                 			<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
                 			<link rel="stylesheet" media="all" type="text/css" href="css/bvhepistemon2014.css" />
 <!--                			<title>
Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-front-idsHeader2textAtt.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-front-idsHeader2textAtt.xsl	(revision 0)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-front-idsHeader2textAtt.xsl	(revision 1654)
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:edate="http://exslt.org/dates-and-times"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0"
+  xmlns:xd="http://www.pnp-software.com/XSLTdoc"
+  version="2.0">
+
+  <xd:doc type="stylesheet">
+    <xd:short>
+      This stylesheet is designed for TXM XTZ+CSV import module to extract 
+      metadata from the idsHeader (IDS-XCES) and add them as attributes
+      of the text element. It should be used at "2-front" step. See TXM 
+      User Manual for more details 
+      (http://textometrie.ens-lyon.fr/spip.php?rubrique64)
+      For more details on source corpus encoding schema see 
+      http://www1.ids-mannheim.de/kl/projekte/korpora/textmodell.html
+    </xd:short>
+    <xd:detail>
+      This stylesheet is free software; you can redistribute it and/or
+      modify it under the terms of the GNU Lesser General Public
+      License as published by the Free Software Foundation; either
+      version 3 of the License, or (at your option) any later version.
+      
+      This stylesheet is distributed in the hope that it will be useful,
+      but WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Lesser General Public License for more details.
+      
+      You should have received a copy of GNU Lesser Public License with
+      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+    </xd:detail>
+    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+    <xd:copyright>2017, CNRS / UMR 5317 IHRIM (CACTUS research group)</xd:copyright>
+  </xd:doc>
+
+
+
+  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/> 
+  
+  
+<!-- General patterns: all elements, attributes, comments and processing instructions are copied -->
+  
+  <xsl:template match="*">      
+        <xsl:copy>
+          <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
+        </xsl:copy>    
+  </xsl:template>
+  
+  <xsl:template match="@*|comment()|processing-instruction()">
+    <xsl:copy/>
+  </xsl:template>
+
+  <xsl:variable name="current-file-name">
+    <xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.[^/]+$">
+      <xsl:matching-substring>
+        <xsl:value-of select="regex-group(2)"/>
+      </xsl:matching-substring>
+    </xsl:analyze-string>
+  </xsl:variable>
+  
+<!-- Extracting metadata to use -->
+ 
+  <xsl:variable name="title">
+    <xsl:value-of select="/idsText/idsHeader//h.title[@type='abbr']"/>
+  </xsl:variable>
+  <xsl:variable name="date">
+    <xsl:value-of select="idsText/idsHeader//creatDate"/>
+  </xsl:variable>
+  
+
+<!-- Injecting metadata into attibutes of the text element -->
+
+<xsl:template match="text">
+  <xsl:copy>
+    <xsl:apply-templates select="@*"/>
+    <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute>
+    <xsl:attribute name="date"><xsl:value-of select="$date"/></xsl:attribute>
+    <xsl:apply-templates/>
+  </xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet>
\ No newline at end of file

Property changes on: tmp/org.txm.core/res/org/txm/xml/xsl/txm-front-idsHeader2textAtt.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-posttok-addRef.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-posttok-addRef.xsl	(revision 1653)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-posttok-addRef.xsl	(revision 1654)
@@ -50,6 +50,15 @@
   
   <!-- General patterns: all elements, attributes, comments and processing instructions are copied -->
   
+  <xsl:variable name="filename">
+    <xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.xml$">
+      <xsl:matching-substring>
+        <xsl:value-of select="regex-group(2)"/>
+      </xsl:matching-substring>
+    </xsl:analyze-string>
+  </xsl:variable>
+  
+  
   <xsl:template match="*">      
         <xsl:copy>
           <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
@@ -61,16 +70,19 @@
   <xsl:template match="@*|comment()|processing-instruction()">
     <xsl:copy/>
   </xsl:template>
-  
+    
   <xsl:template match="*:w">
     <xsl:variable name="ref">
-      <xsl:if test="ancestor::*:text/@*:id"></xsl:if>
-      <xsl:value-of select="ancestor::*:text[1]/@*:id[1]"/>
-      <xsl:if test="ancestor::*:text/@*:id and preceding::*:pb[1]/@n">
-        <xsl:text>, </xsl:text>
-      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="ancestor::*:text/@*:id">
+          <xsl:value-of select="ancestor::*:text[1]/@*:id[1]"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$filename"/>
+        </xsl:otherwise>
+      </xsl:choose>
       <xsl:if test="preceding::*:pb[1]/@n">
-        <xsl:text>p. </xsl:text>
+        <xsl:text>, p. </xsl:text>
         <xsl:value-of select="preceding::*:pb[1]/@n"/>
       </xsl:if>
       <xsl:if test="(ancestor::*:text/@*:id or preceding::*:pb[1]/@n) and preceding::*:lb[1]/@n">
Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-bnc_oral-xmlw.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-bnc_oral-xmlw.xsl	(revision 0)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-bnc_oral-xmlw.xsl	(revision 1654)
@@ -0,0 +1,124 @@
+<?xml version="1.0"?>
+<xsl:stylesheet
+  xmlns:xd="http://www.pnp-software.com/XSLTdoc"
+  xmlns:edate="http://exslt.org/dates-and-times"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0"
+  exclude-result-prefixes="tei edate xd" version="2.0">
+  
+  <xd:doc type="stylesheet">
+    <xd:short>
+      Feuille de style de préparation de fichiers BNC oral à l'importation dans TXM
+      (module XML/W+CSV).
+    </xd:short>
+    <xd:detail>
+      This stylesheet is free software; you can redistribute it and/or
+      modify it under the terms of the GNU Lesser General Public
+      License as published by the Free Software Foundation; either
+      version 3 of the License, or (at your option) any later version.
+      
+      This stylesheet is distributed in the hope that it will be useful,
+      but WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Lesser General Public License for more details.
+      
+      You should have received a copy of GNU Lesser Public License with
+      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+    </xd:detail>
+    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+    <xd:copyright>2015, CNRS / ICAR (Cédilles-CACTUS)</xd:copyright>
+  </xd:doc>
+  
+
+  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
+  
+	<!-- Listes des balises par type de traitement. -->
+	
+	<!--Par défaut, les balises sont conservées (les espaces de nommage sont
+	respectés). On peut utiliser les paramètres ci-dessous pour indiquer les balises
+	à supprimer en conservant ou non leur contenu--> 
+	
+	<!-- balises à supprimer avec leur contenu -->
+	
+	<xsl:param name="deleteAll">teiHeader</xsl:param>
+	
+	<xsl:template match="*[matches(name(),concat('^',$deleteAll,'$'))]"/>
+	
+	<!-- balises à supprimer en conservant le contenu-->
+	
+	<xsl:param name="deleteTag"></xsl:param>
+	
+	<xsl:template match="*[matches(name(),concat('^',$deleteTag,'$'))]">
+		<xsl:apply-templates/>
+	</xsl:template>
+	
+  
+  <xsl:template match="*">
+  	<xsl:copy>
+  		<xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>	
+  	</xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="@*|comment()">
+    <xsl:copy/>
+  </xsl:template>
+	
+	<xsl:template match="processing-instruction()"/>
+	
+	<xsl:template match="text()"><xsl:value-of select="."/></xsl:template>
+
+<xsl:template match="stext">
+  <xsl:element name="text">
+    <xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
+    <xsl:attribute name="title"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/fileDesc/titleStmt/title[1])"/></xsl:attribute>
+    <xsl:attribute name="creation"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/profileDesc/creation[1])"/></xsl:attribute>
+    <xsl:attribute name="dlee"><xsl:value-of select="/bncDoc/teiHeader/profileDesc/textClass/classCode[@scheme='DLEE']"/></xsl:attribute>
+    <xsl:choose>
+      <xsl:when test="not(descendant::div[@decls])">
+        
+        <xsl:element name="div">
+          <xsl:attribute name="placename"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/profileDesc/settingDesc/setting[1]/placeName[1])"/></xsl:attribute>
+          <xsl:attribute name="locale"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/profileDesc/settingDesc/setting[1]/locale[1])"/></xsl:attribute>
+          <xsl:attribute name="activity"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/profileDesc/settingDesc/setting[1]/activity[1])"/></xsl:attribute>
+          <xsl:attribute name="activity-spont"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/profileDesc/settingDesc/setting[1]/activity[1]/@spont)"/></xsl:attribute>
+          <xsl:attribute name="recordingdate"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/profileDesc/creation[1])"/></xsl:attribute>
+          <xsl:attribute name="dlee"><xsl:value-of select="/bncDoc/teiHeader/profileDesc/textClass/classCode[@scheme='DLEE']"/></xsl:attribute>
+          <xsl:apply-templates/>
+        </xsl:element>
+      </xsl:when>
+      <xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
+    </xsl:choose>    
+  </xsl:element>
+</xsl:template>
+  
+  <xsl:template match="div[@decls]">
+    <xsl:variable name="decls"><xsl:value-of select="@decls"/></xsl:variable>
+    <xsl:copy>
+      <xsl:apply-templates select="@*"/>
+      <xsl:attribute name="placename"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/profileDesc/settingDesc/setting[matches($decls,@xml:id)]/placeName[1])"/></xsl:attribute>
+      <xsl:attribute name="locale"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/profileDesc/settingDesc/setting[matches($decls,@xml:id)]/locale[1])"/></xsl:attribute>
+      <xsl:attribute name="activity"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/profileDesc/settingDesc/setting[matches($decls,@xml:id)]/activity[1])"/></xsl:attribute>
+      <xsl:attribute name="activity-spont"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/profileDesc/settingDesc/setting[1]/activity[1]/@spont)"/></xsl:attribute>
+      
+      <xsl:attribute name="recordingdate"><xsl:value-of select="normalize-space(/bncDoc/teiHeader/fileDesc/sourceDesc/recordingStmt/recording[matches($decls,@xml:id)]/@date)"/></xsl:attribute>
+      <xsl:attribute name="dlee"><xsl:value-of select="/bncDoc/teiHeader/profileDesc/textClass/classCode[@scheme='DLEE']"/></xsl:attribute>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+
+	<xsl:template match="u">
+	  <xsl:copy>
+	    <xsl:variable name="who"><xsl:value-of select="@who"/></xsl:variable>
+	    <xsl:attribute name="who"><xsl:value-of select="$who"/></xsl:attribute>
+	    <xsl:for-each select="/bncDoc/teiHeader/profileDesc/particDesc/person[@xml:id=$who]/@*[not(local-name()='id')]">
+	      <xsl:attribute name="{lower-case(local-name())}"><xsl:value-of select="."/></xsl:attribute>
+	    </xsl:for-each>
+	    <xsl:for-each select="/bncDoc/teiHeader/profileDesc/particDesc/person[@xml:id=$who]/*">
+	      <xsl:attribute name="{lower-case(local-name())}"><xsl:value-of select="normalize-space(.)"/></xsl:attribute>
+	    </xsl:for-each>
+	    <xsl:apply-templates/>
+	  </xsl:copy>
+	</xsl:template>
+	
+	
+	
+</xsl:stylesheet>
\ No newline at end of file

Property changes on: tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-bnc_oral-xmlw.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-teibvh-xmlw.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-teibvh-xmlw.xsl	(revision 0)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-teibvh-xmlw.xsl	(revision 1654)
@@ -0,0 +1,726 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:edate="http://exslt.org/dates-and-times"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0"
+  xmlns:xd="http://www.pnp-software.com/XSLTdoc"
+  xmlns:txm="http://textometrie.org/1.0"
+  exclude-result-prefixes="tei edate" version="2.0">
+
+  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
+  
+  <xd:doc type="stylesheet">
+    <xd:short>
+      Cette feuille de style prépare les textes BVH à l'import BFM
+    </xd:short>
+    <xd:detail>
+      This stylesheet is free software; you can redistribute it and/or
+      modify it under the terms of the GNU Lesser General Public
+      License as published by the Free Software Foundation; either
+      version 3 of the License, or (at your option) any later version.
+      
+      This stylesheet is distributed in the hope that it will be useful,
+      but WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Lesser General Public License for more details.
+      
+      You should have received a copy of GNU Lesser Public License with
+      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+    </xd:detail>
+    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+    <xd:copyright>2012, CNRS / ICAR (ICAR3 LinCoBaTO)</xd:copyright>
+  </xd:doc>
+  
+  
+  <!-- !!! Enlever &#x2028 ou &#8232; dans 1600_BeroaldRich.xml !!! -->
+  
+  <!--
+    Modifications par AL le  2012-01-25
+    g dépalacé de "deleteAll" vers "deleteTag"
+    classe de balise "name" créée
+    (geogName, placeName, persName et name)
+  -->
+  
+  <!-- 
+    Modifications par LBe le 2012-02-17
+    Transformation automatique des esperluettes dans les métadonnées
+    Suppression des balises label et heraldry
+    Signed n'est plus transformé en ab
+    opener est transformé en ab
+    L'institution et le dépôt sont récupérés pour le lieu de conservation
+  -->
+  
+  <!-- Modifications par AL le 2012-02-20
+    rolename -> roleName
+    suppression des balises surname et forename
+  -->
+  
+  <!-- Modifications par LBe le 2012-03-09
+    Automatisation du nommage des sorties
+  -->
+  
+  <!-- Modifications par LBe le 2013-03-05
+    Ajout des nouveaux descripteurs pour Presto
+  -->
+  
+  <!-- Modifications par LBe le 2014-01-10
+    
+  -->
+  
+<!-- Modifications par AL le 2014-01-13
+    - Fusion des versions BVH et BFM
+    - Détectioon des mots coupés (detextBrokenWord)
+-->
+  
+  <!-- Listes des balises par type de traitement (les templates sont plus bas) -->
+  
+  <!-- balises à supprimer avec leur contenu -->
+  <xsl:template match="tei:figDesc|tei:figure|tei:fw
+    |tei:space">
+    <xsl:call-template name="deleteAll"/>
+  </xsl:template>
+  
+  <!-- balises à supprimer, contenu à conserver -->  
+  <xsl:template match="tei:castItem|tei:castGroup[ancestor::tei:castList]
+    |tei:castList[ancestor::tei:p]|tei:cell|tei:cit|tei:date
+    |tei:forename|tei:g|tei:head[parent::tei:list]|tei:heraldry|tei:hi|tei:item|tei:label|tei:lem
+    |tei:list[ancestor::tei:p|ancestor::tei:ab]|tei:lg[child::tei:lg|ancestor::tei:sp]
+    |tei:p[ancestor::tei:sp]|tei:performance
+    |tei:ref|tei:role|tei:roleDesc
+    |tei:row|tei:salute|tei:signed[ancestor::tei:closer]|tei:speaker|tei:stage[ancestor::tei:p|ancestor::tei:ab]
+    |tei:surname|tei:table[ancestor::tei:p]|tei:term|tei:unclear">
+    <xsl:call-template name="deleteTag"/>
+  </xsl:template>
+  
+  <!-- balises à transformer en notes-->
+<!--  <xsl:template match="tei:bibl[not(ancestor::tei:note)]
+    |tei:rdg[parent::tei:app and not(ancestor::tei:note)]">
+    <xsl:call-template name="makeNote"/>
+  </xsl:template>
+-->  
+  <!-- balises de noms à indexer -->
+  
+  <xsl:template match="tei:name
+    |tei:geogName
+    |tei:persName
+    |tei:placeName
+    |tei:roleName">
+    <xsl:call-template name="makeName"/>
+  </xsl:template>
+  
+  <!-- à transformer en W -->
+  
+  <xsl:template match="tei:abbr[not(parent::tei:choice)]
+    |tei:num[matches(.,'.')]">
+    <xsl:call-template name="makeWord"/>
+  </xsl:template>
+  
+  <!-- à transformer en AB typé -->
+  
+  <xsl:template match="tei:byline|tei:lg[not(child::tei:lg or ancestor::tei:sp)]|tei:list[not(ancestor::tei:p|ancestor::tei:ab)]
+    |tei:closer|tei:opener|tei:sp|tei:castGroup[not(ancestor::tei:castList)]|tei:castList[not(ancestor::tei:p)]
+    |tei:signed[not(ancestor::tei:closer)]
+    |tei:stage[not(ancestor::tei:p|ancestor::tei:ab)]
+    |tei:table[not(ancestor::tei:p)]
+    |tei:trailer">
+    <xsl:call-template name="makeAb"/>
+  </xsl:template>
+  
+  <!-- à transformer en DIV typé -->
+  
+  <xsl:template match="tei:set">
+    <xsl:call-template name="makeDiv"/>
+  </xsl:template>
+
+<!-- Partie générale : on copie les éléments, les attributs, le texte, les commentaires, on supprime mes prrocessing intstructions -->
+<!-- + nommage auto des fichiers -->
+  
+  <xsl:variable name="filedir">
+    <xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)$">
+      <xsl:matching-substring>
+        <xsl:value-of select="regex-group(1)"></xsl:value-of>
+      </xsl:matching-substring>
+    </xsl:analyze-string></xsl:variable>
+  
+  
+  <xsl:template match="/">
+    <xsl:variable name="compare1" select="//tei:TEI/@xml:id"/>
+    <!--<xsl:variable name="compare2" select="document('Nommage_Output_TXM.xml')//name/@id"/>-->
+    <xsl:variable name="compare2" select="$nommage//name/@id"/>
+    <xsl:variable name="name" select="document('Nommage_Output_TXM.xml')//name"/>
+      <xsl:if test="$compare1 = $compare2">
+    <xsl:result-document href="{concat($filedir,'/out/',$name[@id=$compare1], '.xml')}">
+      <xsl:apply-templates/>  
+    </xsl:result-document>
+      </xsl:if>      
+  </xsl:template>
+  
+  
+  
+  <xsl:template match="*">    
+    <xsl:if test="descendant::tei:pb and (parent::tei:text or (position() &gt; 2))">
+ <!-- on déplace les pb initiaux avant la balise de l'élément le plus haut -->
+      <xsl:call-template name="raisePb"/>
+    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="namespace-uri()=''">
+        <xsl:element namespace="http://www.tei-c.org/ns/1.0" name="{local-name(.)}">
+          <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
+        </xsl:element>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy>
+          <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
+        </xsl:copy>
+      </xsl:otherwise>
+    </xsl:choose>  
+  </xsl:template>
+
+  <xsl:template match="@*|comment()|text()|processing-instruction()">
+    <xsl:copy/>
+  </xsl:template>
+	
+	<xsl:template match="@instant[.='false']"></xsl:template>
+	<xsl:template match="@status[.='unremarkable']"></xsl:template>
+
+<!--  <xsl:template match="text()">
+    <xsl:analyze-string select="." regex="&amp;">
+      <xsl:matching-substring><expan xmlns="http://www.tei-c.org/ns/1.0">et</expan></xsl:matching-substring>
+      <xsl:non-matching-substring>         
+            <xsl:value-of select="."/>
+      </xsl:non-matching-substring>      
+    </xsl:analyze-string>
+  </xsl:template>
+  
+
+  <xsl:template match="processing-instruction()"/>-->
+
+<!-- On supprime teiHeader -->
+  
+  <xsl:template match="tei:teiHeader">    
+<!--      <xsl:copy-of select="."/>-->    
+  </xsl:template>
+
+<!-- On supprime les balises et tout ce qu'elles contiennent pour les éléments hors texte à ignorer lors de l'import -->
+  
+  <xsl:template name="deleteAll"/>
+
+<!-- On supprime les balises non essentielles pour l'exploitation textométrique et susceptibles de poser des problèmes au tokeniseur,
+  mais on garde leur contenu qui fait partie du matériau textuel -->
+  
+  <xsl:template name="deleteTag">
+    <xsl:apply-templates/>
+  </xsl:template>
+
+<!-- on met en note les éléments hors texte qu'on aimerait garder pour l'édition, etc. -->
+  
+<!--  <xsl:template name="makeNote">
+    <note type="{local-name()}" xmlns="http://www.tei-c.org/ns/1.0">
+      <xsl:value-of select="."/>
+    </note>
+  </xsl:template>
+-->  
+<!-- On supprime toutes les balises à l'intérieur des notes-->
+<!--  <xsl:template match="tei:note">
+    <xsl:copy>
+      <xsl:value-of select="."></xsl:value-of>
+    </xsl:copy>
+  </xsl:template>-->
+
+<!-- On transforme en DIV typés les balises de niveau de division textuelle (pouvant contenir des p) -->
+
+  <xsl:template name="makeDiv">
+    <div type="{local-name()}" xmlns="http://www.tei-c.org/ns/1.0">
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </div>
+  </xsl:template>  
+
+<!-- On transforme en bloc anonyme les balises de niveau équivalent au paragraphe -->
+
+  <xsl:template name="makeAb">
+    <ab type="{local-name()}" xmlns="http://www.tei-c.org/ns/1.0">
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </ab>
+  </xsl:template>
+
+  <!-- on pré-tokenise les éléments équivalents à un mot -->
+  
+  <xsl:template name="makeWord">
+    <xsl:variable name="wordType">
+      <xsl:choose>
+        <xsl:when test="@type">
+          <xsl:value-of select="concat(local-name(),'-',@type)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="local-name()"></xsl:value-of>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <w type="{$wordType}" xmlns="http://www.tei-c.org/ns/1.0"><xsl:apply-templates/></w>
+  </xsl:template>  
+
+<xsl:template name="makeName">
+  <xsl:variable name="nameType">
+    <xsl:choose>
+      <xsl:when test="@type">
+        <xsl:value-of select="concat(local-name(),'-',@type)"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="local-name()"></xsl:value-of>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <name type="{$nameType}" xmlns="http://www.tei-c.org/ns/1.0">
+    <xsl:apply-templates/>
+  </name>
+</xsl:template>
+
+<!-- on avant l'élément au début duquel ils se situent -->
+
+  <xsl:template name="raisePb">
+    <xsl:if test="descendant::tei:pb">
+      <xsl:for-each select="child::*[1][descendant-or-self::tei:pb]">
+        <xsl:choose>
+          <xsl:when test="self::tei:pb"><xsl:comment>Pb remonté</xsl:comment>
+            <xsl:copy>
+            	<xsl:apply-templates select="@*"/>
+            	<xsl:if test="not(@n) and not(@facs) and following-sibling::tei:fw[1 or 2][@type='pageNum']">
+            		<xsl:attribute name="n"><xsl:value-of select="normalize-space(following-sibling::tei:fw[@type='pageNum'][1])"/></xsl:attribute>
+            	</xsl:if>
+            </xsl:copy></xsl:when>
+          <xsl:otherwise><xsl:call-template name="raisePb"></xsl:call-template></xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
+    </xsl:if>
+  </xsl:template>
+  
+
+<xsl:template match="tei:pb[not(preceding-sibling::*) and not(parent::tei:text)]">
+  <xsl:comment>Pb déplacé plus haut</xsl:comment>
+</xsl:template>
+
+<xsl:template match="tei:pb[preceding-sibling::*]">
+	<xsl:copy>
+		<xsl:apply-templates select="@*"/>
+		<xsl:if test="not(@n) and not(@facs) and following-sibling::tei:fw[1 or 2][@type='pageNum']">
+			<xsl:attribute name="n"><xsl:value-of select="normalize-space(following-sibling::tei:fw[@type='pageNum'][1])"/></xsl:attribute>
+		</xsl:if>
+	</xsl:copy>
+</xsl:template>
+
+<!-- les l sont transformés en lb -->
+  
+  <xsl:template match="tei:l">
+    <lb xmlns="http://www.tei-c.org/ns/1.0">
+      <xsl:if test="@n">
+        <xsl:attribute name="n"><xsl:value-of select="@n"/></xsl:attribute>
+      </xsl:if>
+    </lb>
+    <xsl:apply-templates/>
+  </xsl:template>
+  
+
+<!-- On met la ponctuation forte à l'extérieur de la balise foreign :
+Cet élément sera toujours à l'intérieur d'une phrase. Attention au risque
+de perdre les balises éventuelles à l'intérieur-->
+  
+  <xsl:template
+    match="tei:foreign[matches(.,'[.!?]')]">
+    <xsl:variable name="lang">
+      <xsl:choose>
+        <xsl:when test="@lang"><xsl:value-of select="@lang"/></xsl:when>
+        <xsl:when test="@xml:lang"><xsl:value-of select="@xml:lang"/></xsl:when>
+        <xsl:otherwise>xx</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:for-each select="child::node()">
+      <xsl:choose>
+        <xsl:when test="self::text()">
+          <xsl:analyze-string select="." regex="([^.!?]*)([.?!]+)">
+            <xsl:matching-substring>
+              <foreign lang="{$lang}" xmlns="http://www.tei-c.org/ns/1.0">          
+                <xsl:analyze-string select="regex-group(1)" regex="&amp;">
+                  <xsl:matching-substring><expan xmlns="http://www.tei-c.org/ns/1.0">et</expan></xsl:matching-substring>
+                  <xsl:non-matching-substring>         
+                    <xsl:value-of select="."/>
+                  </xsl:non-matching-substring>      
+                </xsl:analyze-string>
+              </foreign>
+              <xsl:value-of select="regex-group(2)"/>
+              <xsl:text> </xsl:text>
+            </xsl:matching-substring>
+          </xsl:analyze-string>          
+        </xsl:when>
+        <xsl:when test="self::*[not(descendant::text())]">
+          <xsl:apply-templates/>
+        </xsl:when>
+        <xsl:otherwise>
+          <foreign lang="{$lang}" xmlns="http://www.tei-c.org/ns/1.0">          
+            <xsl:apply-templates select="."/>          
+          </foreign>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:for-each>
+  </xsl:template>
+  
+  <!-- Injection des métadonnées -->
+  
+  <!-- copie de la template créée pour le header BVH -->
+  
+  <xsl:template match="tei:text">
+    <xsl:variable name="auteur">
+      <xsl:choose>
+        <xsl:when test="//tei:monogr/tei:author[1]/tei:persName/tei:forename">
+          <xsl:value-of select="//tei:monogr/tei:author[1]/tei:persName/tei:forename"/>&#160;<xsl:value-of select="//tei:monogr/tei:author[1]/tei:persName/tei:surname"/>
+        </xsl:when>
+        <xsl:when test="//tei:monogr/tei:author[1]/tei:persName">
+          <xsl:value-of select="//tei:monogr/tei:author[1]/tei:persName"/>
+        </xsl:when>
+        <xsl:when test="//tei:monogr/tei:author">
+          <xsl:value-of select="//tei:monogr/tei:author"/>
+        </xsl:when>
+        <xsl:otherwise>anonyme</xsl:otherwise>
+      </xsl:choose>      
+    </xsl:variable>
+    <xsl:variable name="titre">
+      <xsl:value-of select="translate(//tei:monogr/tei:title[@type='titre_court'],'&amp;', 'et')"/>
+    </xsl:variable>    
+    
+        <text xmlns="http://www.tei-c.org/ns/1.0">
+          <!-- id -->
+             <xsl:variable name="compare1" select="//tei:TEI/@xml:id"/>
+             <xsl:variable name="compare2" select="document('Nommage_Output_TXM.xml')//name/@id"/>
+             <xsl:variable name="name" select="document('Nommage_Output_TXM.xml')//name"/>
+      <xsl:if test="$compare1 = $compare2">        
+          <xsl:attribute name="id">             
+            <xsl:value-of select="$name[@id=$compare1]"/>
+          </xsl:attribute>
+      </xsl:if>
+          <!-- sigle -->
+             <xsl:variable name="compare1" select="//tei:TEI/@xml:id"/>
+             <xsl:variable name="compare2" select="document('Nommage_Output_TXM.xml')//name/@id"/>
+             <xsl:variable name="name" select="document('Nommage_Output_TXM.xml')//name"/>
+      <xsl:if test="$compare1 = $compare2">        
+          <xsl:attribute name="nom">             
+            <xsl:value-of select="$name[@id=$compare1]"/>
+          </xsl:attribute>
+      </xsl:if>
+          <!-- auteur -->
+            <xsl:attribute name="auteur">
+              <xsl:value-of select="$auteur"/>
+            </xsl:attribute>
+          <!-- titre -->
+            <xsl:attribute name="titre">
+                <xsl:value-of select="$titre"/>
+            </xsl:attribute>
+          <!-- date de composition -->
+          <xsl:attribute name="date">
+            <xsl:value-of select="//tei:monogr//tei:imprint/tei:date"/>
+          </xsl:attribute>
+          <!-- forme -->
+            <xsl:attribute name="forme">
+                <xsl:choose>
+                    <xsl:when test="//tei:TEI[@xml:id='B360446201_B343_1_tei' 
+                      or @xml:id='B360446201_B343_2_tei'
+                      or @xml:id='B360446201_THIA63_1_tei.xml'
+                      or @xml:id='B372615206_1263_tei'
+                      or @xml:id='B372615206_3436_tei'
+                      or @xml:id='B372615206_4023_tei'
+                      or @xml:id='B372615206_4040_tei'
+                      or @xml:id='B372616101_3537_tei'
+                      or @xml:id='B410186201_I65_tei'
+                      or @xml:id='B410186201_LI139_tei'
+                      or @xml:id='B693836101_346632_tei'
+                      or @xml:id='B693836101_A489170_tei'
+                      or @xml:id='B751041006_FR_1513_tei'
+                      or @xml:id='B751131010_FR3370_suppl_tei'
+                      or @xml:id='B751131011_Y2_251_tei'
+                      or @xml:id='B751131011_Y22789_tei'
+                      or @xml:id='B751131015_X1888_tei'
+                      or @xml:id='B751131015_Z1918_tei'
+                      or @xml:id='B759999999_Y2_2162_tei'
+                      or @xml:id='B759999999_Y2_2164_tei'
+                      or @xml:id='B861946101_DP1139_tei'
+                      or @xml:id='XUVA_Gordon1578_L47_tei']">
+                        <xsl:text>Prose</xsl:text>
+                    </xsl:when>
+                    <xsl:otherwise>
+                      <xsl:text>Vers</xsl:text>
+                    </xsl:otherwise>
+                </xsl:choose>
+            </xsl:attribute>
+          <!-- domaine -->
+            <xsl:attribute name="domaine">
+               <xsl:text>Littéraire</xsl:text>
+            </xsl:attribute>
+            <!-- genre -->
+            <xsl:attribute name="genre">
+            <xsl:text>|</xsl:text><xsl:value-of select="translate(@type, '_', ' ')"/><xsl:text>|</xsl:text><xsl:value-of select="translate(@subtype, '_', ' ')"/><xsl:text>|</xsl:text>
+            </xsl:attribute> 
+          <!-- nb mots -->
+          <xsl:attribute name="mots"/>
+            <!-- nb pages -->
+            <xsl:attribute name="pages">
+            <xsl:value-of select="count(//tei:pb)"/>
+            </xsl:attribute>
+          <!-- texte intégral -->
+          <xsl:attribute name="integral">
+            <xsl:text>Oui</xsl:text>
+          </xsl:attribute>
+          <!-- editeur scientifique -->
+          <xsl:attribute name="edsci">
+            <xsl:text>Marie-Luce Demonet</xsl:text>
+          </xsl:attribute>
+          <!-- maison d'édition -->
+          <xsl:attribute name="edcomm">
+            <xsl:text>Bibliothèques Virtuelles Humanistes (</xsl:text><xsl:value-of select="//tei:date[@type='mise_en_ligne']/@when"/><xsl:text>)</xsl:text>
+                     </xsl:attribute>
+            <!-- date d'édition -->
+            <xsl:attribute name="eddate">
+               <xsl:value-of select="//tei:monogr//tei:imprint/tei:date"/>
+            </xsl:attribute>
+            <!-- origine du texte -->
+            <xsl:choose>
+              <xsl:when test="//tei:msDesc/tei:msIdentifier/tei:repository[text()]">
+            <xsl:attribute name="origine">
+              <xsl:choose>
+              <xsl:when test="//tei:msDesc/tei:msIdentifier/tei:institution">
+               <xsl:value-of select="//tei:msDesc/tei:msIdentifier/tei:settlement"/>,<xsl:value-of select="//tei:msDesc/tei:msIdentifier/tei:institution"/>,<xsl:value-of select="//tei:msDesc/tei:msIdentifier/tei:repository"/>
+              </xsl:when>
+                <xsl:otherwise>
+                  <xsl:value-of select="//tei:msDesc/tei:msIdentifier/tei:settlement"/>,<xsl:value-of select="//tei:msDesc/tei:msIdentifier/tei:repository"/>
+                </xsl:otherwise>
+              </xsl:choose>              
+            </xsl:attribute>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:attribute name="origine">
+                  <xsl:value-of select="//tei:msDesc/tei:msIdentifier/tei:settlement"/>,<xsl:value-of select="//tei:msDesc/tei:msIdentifier/tei:institution"/>
+                </xsl:attribute>
+              </xsl:otherwise>
+            </xsl:choose>      
+            
+            <!-- copyright -->
+            <xsl:attribute name="statut">
+                  <xsl:text>Creative Commons BY-NC-ND 2.0</xsl:text>
+            </xsl:attribute> 
+            <!-- etat -->            
+            <xsl:attribute name="etat">              
+                <xsl:text>TEI P5</xsl:text>           
+            </xsl:attribute>  
+            <!-- caractères modernisés -->
+          <xsl:attribute name="carmod">
+            <xsl:text>Oui</xsl:text>
+          </xsl:attribute>
+          <!-- orthographe modernisée -->
+          <xsl:attribute name="orthomod">
+            <xsl:text>Non</xsl:text>
+          </xsl:attribute>
+            <!-- lieu de publication -->
+          <xsl:if test="//tei:monogr//tei:pubPlace">
+            <xsl:attribute name="lieuPublication">
+                <xsl:value-of select="//tei:monogr//tei:pubPlace"/>
+            </xsl:attribute>
+          </xsl:if>          
+            <!-- imprimeur -->
+          <xsl:if test="//tei:monogr//tei:publisher[contains(@role,'imprimeur')]/tei:persName">
+            <xsl:attribute name="imprimeur">  
+                <xsl:for-each select="//tei:monogr//tei:publisher[contains(@role,'imprimeur')][not(position()=last())]/tei:persName">|<xsl:call-template name="persname"/></xsl:for-each>
+                <xsl:for-each select="//tei:monogr//tei:publisher[contains(@role,'imprimeur')][last()]/tei:persName">|<xsl:call-template name="persname"/>|</xsl:for-each>
+            </xsl:attribute>
+          </xsl:if>
+            <!-- libraire -->
+          <xsl:if test="//tei:monogr//tei:publisher[contains(@role,'libraire')]/tei:persName">
+            <xsl:attribute name="libraire">
+                <xsl:for-each select="//tei:monogr//tei:publisher[contains(@role,'libraire')][not(position()=last())]/tei:persName">|<xsl:call-template name="persname"/></xsl:for-each>
+                <xsl:for-each select="//tei:monogr//tei:publisher[contains(@role,'libraire')][last()]/tei:persName">|<xsl:call-template name="persname"/>|</xsl:for-each>
+            </xsl:attribute>
+          </xsl:if>             
+            <!-- période du texte -->
+            <xsl:attribute name="siecle">
+                <xsl:choose>
+                    <xsl:when test="//tei:sourceDesc//tei:biblStruct//tei:date[number(.)&gt;=1301 and number(.)&lt;=1400]">
+                        <xsl:text>XIVème siècle</xsl:text>
+                    </xsl:when>
+                    <xsl:when test="//tei:sourceDesc//tei:biblStruct//tei:date[number(.)&gt;=1401 and number(.)&lt;=1500]">
+                        <xsl:text>XVème siècle</xsl:text>
+                    </xsl:when>
+                    <xsl:when test="//tei:sourceDesc//tei:biblStruct//tei:date[number(.)&gt;=1501 and number(.)&lt;=1600]">
+                        <xsl:text>XVIème siècle</xsl:text>
+                    </xsl:when>
+                    <xsl:when test="//tei:sourceDesc//tei:biblStruct//tei:date[number(.)&gt;=1601 and number(.)&lt;=1700]">
+                        <xsl:text>XVIIème siècle</xsl:text>
+                    </xsl:when>
+                </xsl:choose>
+            </xsl:attribute>
+            <!-- lieu de conservation -->
+          <xsl:if test="//tei:msDesc/tei:msIdentifier">
+            <xsl:choose>
+              <xsl:when test="//tei:msDesc/tei:msIdentifier/tei:repository[text()]">
+            <xsl:attribute name="lieuConservation">
+               <xsl:value-of select="//tei:msDesc/tei:msIdentifier/tei:institution"/>&#160;<xsl:value-of select="//tei:msDesc/tei:msIdentifier/tei:repository"/>
+            </xsl:attribute>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:attribute name="lieuConservation">
+                  <xsl:value-of select="//tei:msDesc/tei:msIdentifier/tei:institution"/>
+                </xsl:attribute>
+              </xsl:otherwise>
+            </xsl:choose>            
+          </xsl:if>          
+            <!-- format de l'ouvrage -->
+          <xsl:if test="//tei:dimensions/tei:dim[@type='format']">
+            <xsl:attribute name="format">
+               <xsl:value-of select="//tei:dimensions/tei:dim[@type='format']"/>
+            </xsl:attribute>
+          </xsl:if>          
+            <!-- langues présentes dans le livre, par ordre d'importance -->
+            <xsl:attribute name="langue">
+              <xsl:for-each select="//tei:langUsage/tei:language[not(position()=last())]"><xsl:value-of select="."/>&#160;</xsl:for-each><xsl:value-of select="//tei:langUsage/tei:language[last()]"/>               
+            </xsl:attribute>             
+        <!-- copyright -->
+            <xsl:attribute name="copyright">
+                  <xsl:text>Bibliothèques Virtuelles Humanistes, CESR, Creative Commons BY-NC-ND 2.0</xsl:text>
+            </xsl:attribute>          
+                <xsl:apply-templates/>
+            </text>        
+  </xsl:template>
+  
+  <xsl:template name="persname">
+      <xsl:choose>
+         <xsl:when test="tei:surname"><xsl:value-of select="tei:forename"/>&#160;<xsl:value-of select="tei:surname"/></xsl:when>
+         <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
+      </xsl:choose>
+   </xsl:template>
+	
+	<xsl:template match="tei:app">
+		<xsl:choose>
+			<xsl:when test="tei:lem">
+				<xsl:apply-templates select="tei:lem"/>
+				<note xmlns="http://www.tei-c.org/ns/1.0" type="app">
+					<xsl:for-each select="tei:rdg">
+						<xsl:value-of select="concat(@wit,' : ')"/><xsl:apply-templates/>
+						<xsl:choose>
+							<xsl:when test="following-sibling::tei:rdg">&#160;; </xsl:when>
+							<xsl:otherwise>. </xsl:otherwise>
+						</xsl:choose>
+					</xsl:for-each>
+				</note>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:apply-templates select="tei:rdg[1]"/>
+				<note xmlns="http://www.tei-c.org/ns/1.0" type="app">
+					<xsl:for-each select="tei:rdg[not(position()=1)]">
+						<xsl:value-of select="concat(@wit,' : ')"/><xsl:apply-templates/>
+						<xsl:choose>
+							<xsl:when test="following-sibling::tei:rdg">&#160;; </xsl:when>
+							<xsl:otherwise>. </xsl:otherwise>
+						</xsl:choose>
+					</xsl:for-each>
+				</note>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+   
+  <xsl:template match="//tei:choice|//tei:corr|//tei:expan|//tei:reg|//tei:supplied|//tei:subst|//tei:add|//tei:del">
+    <xsl:copy>
+      <xsl:apply-templates select="@*"/>
+      <xsl:call-template name="detectBrokenWord"/>
+        <xsl:apply-templates/>
+     </xsl:copy>
+  </xsl:template>
+  
+  <xsl:template name="detectBrokenWord">
+    <xsl:if test="not(matches(.,'^\s*[.,:;!?\])]'))"><xsl:choose>
+      <xsl:when test="following-sibling::text()[1][matches(.,'^\w')] and preceding-sibling::text()[1][matches(.,'\w$')]">
+        <xsl:attribute name="txm:wordPart">middle</xsl:attribute>
+      </xsl:when>
+      <xsl:when test="following-sibling::text()[1][matches(.,'^(’|'')?\w')]">
+        <xsl:attribute name="txm:wordPart">start</xsl:attribute>
+      </xsl:when>
+      <xsl:when test="preceding-sibling::text()[1][matches(.,'\w$')]">
+        <xsl:attribute name="txm:wordPart">end</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise/>
+    </xsl:choose></xsl:if>
+  </xsl:template>
+   
+  <!--<xsl:variable name="filename">
+    <xsl:analyze-string select="document-uri(.)" regex="^.*/([^/]+)\.xml$">
+      <xsl:matching-substring>
+        <xsl:value-of select="regex-group(1)"></xsl:value-of>
+      </xsl:matching-substring>
+    </xsl:analyze-string></xsl:variable>
+  
+  
+  <xsl:variable name="metadata" select="document(concat($filedir,'/meta/metadata.csv.xml'))//text[@id=$filename]" as="node()"/>
+  
+  <xsl:template match="tei:text">
+    <xsl:choose>
+      <xsl:when test="matches($metadata,'.+')">
+        <text xmlns="http://www.tei-c.org/ns/1.0">
+          <xsl:for-each select="$metadata/entry">
+            <xsl:attribute name="{@id}"><xsl:value-of select="@value"/></xsl:attribute>
+          </xsl:for-each>
+          <xsl:apply-templates/>
+        </text>
+      </xsl:when>
+      <xsl:otherwise>        
+        <xsl:copy>
+          <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
+        </xsl:copy>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>    -->
+  
+<xsl:variable name="nommage">
+	<collection>
+		<name id="B372615206_3436_tei">1586_GarzoniThe</name>
+		<name id="B372616101_3537_tei">1546_RabelaisTL</name>
+		<name id="B410186201_LI139_tei">1554_CalenzioRo</name>
+		<name id="B693836101_A489170_tei">1561_DPeriersNR</name>
+		<name id="B751131015_PYC612_tei">1545_HoraceAP</name>
+		<name id="B751131015_X1888_tei">1549_DuBellayDef</name>
+		<name id="B751131015_YE11562_tei">1555_LabeOeuv</name>
+		<name id="B751131015_YE1735_tei">1550_DuBellayOl</name>
+		<name id="XUVA_Gordon1543_B53_tei">1543_MarotBlaso</name>
+		<name id="XUVA_Gordon1578_L47_tei">1578_LeryBresil</name>
+		<name id="B372615206_4040_tei">1566_GelliDisc</name>
+		<name id="B751131015_Z1918_tei">1533_ToryMouche</name>
+		<name id="B861946101_DP1139_tei">1556_VinetDisc</name>
+		<name id="B372615206_1263_tei">1538_Castiglion</name>
+		<name id="B410186201_I65_tei">1529_ToryChampf</name>
+		<name id="B693836101_355925_tei">1547_SceveSauls</name>
+		<name id="B751131011_PYE868_tei">1563_RonsardRep</name>
+		<name id="B751131011_Y2_251_tei">1536_FloresFlam</name>
+		<name id="XUVA_Gordon1563_R65b_2_tei">1563_RonsardMis</name>
+		<name id="XUVA_Gordon1563_R66_tei">1563_RonsardIns</name>
+		<name id="XUVA_Gordon1563_R67b_tei">1563_RonsardRem</name>
+		<name id="XUVA_Gordon1563_R656_tei">1563_RonsardEle</name>
+		<name id="XUVA_Gordon1543_K43_tei">1543_CorroCebes</name>
+		<name id="B751131015_YE1457_1460_tei">1538_MarotAdole</name>
+		<name id="B759999999_Y2_2164_tei">1552_RabelaisQL</name>
+		<name id="B360446201_THIA63_1_tei">1576_DeschpsHT</name>
+		<name id="B372615206_4023_tei">1600_BeroaldRich</name>
+		<name id="B759999999_Y2_2162_tei">1552_RabelaisTL</name>
+		<name id="B693836101_346632_tei">1610_BeroaldVoyg</name>
+		<name id="B751131011_YE4769_tei">1550_RonsardQuat</name>
+		<name id="B360446201_B343_2_tei">1542_RabelaisGrgt</name>
+		<name id="B751131010_FR3370_suppl_tei">1552_RabelaisBDcl</name>
+		<name id="B751131011_YE645_tei">1550_RonsardPaix</name>
+		<name id="B372616101_2950_tei">1549_DuBellayOl</name>
+		<name id="XUVA_Gordon1563_R656b_tei">1563_RonsardEle2</name>
+		<name id="B751041006_FR_1513_tei">1548_RabelaisQL</name>
+		<name id="B360446201_B343_1_tei">1542_RabelaisPtgl</name>
+		<name id="B751131011_Y22168_tei">1564_RabelaisCL</name>
+		<name id="B751131011_Y22789_tei">1616_BeroaldMoy</name>
+		<name id="B452346101_D1497_3_tei">1572_MansSavoye</name>
+		<name id="B452346101_H6513_tei">1567_BuchananJephte</name>
+		<name id="M0275_01_tei">1580_MontaigneEssais</name>
+		<name id="Essais_88_tei">1588_MontaigneEssais</name>
+	</collection>	
+</xsl:variable>
+
+
+
+</xsl:stylesheet>
\ No newline at end of file

Property changes on: tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-teibvh-xmlw.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-corpusakkadien-xmlw_syllabes-cuneiform.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-corpusakkadien-xmlw_syllabes-cuneiform.xsl	(revision 1653)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-filter-corpusakkadien-xmlw_syllabes-cuneiform.xsl	(revision 1654)
@@ -85,6 +85,10 @@
   </xsl:analyze-string>
 </xsl:template>-->
   
+  <xsl:template match="text()[not(ancestor::*[local-name()='w']) and ancestor::*[local-name()='text']]">
+  <txmOffText><xsl:value-of select="."/></txmOffText>
+</xsl:template>
+  
   <xsl:template match="*[local-name()='g']">
     <xsl:variable name="line"><xsl:value-of select="ancestor::*[local-name()='w']/@line"/></xsl:variable>
     <xsl:variable name="lemma"><xsl:value-of select="ancestor::*[local-name()='w']/@lemma"/></xsl:variable>
@@ -111,7 +115,7 @@
       <xsl:call-template name="hex2num"><xsl:with-param name="hex"><xsl:value-of select="substring(@refUnicode,4)"/></xsl:with-param></xsl:call-template>
     </xsl:variable>
     
-    <w line="{$line}" lemma="{$lemma}" pos="{$pos}" word-form="{$word-form}" supplied="{$supplied}" unclear="{$unclear}" ref-syllabaire="{@refSyllabaire}" ref-unicode="{@refUnicode}"><xsl:value-of select="."/></w>
+    <w line="{$line}" lemma="{$lemma}" pos="{$pos}" word-form="{$word-form}" supplied="{$supplied}" unclear="{$unclear}" ref-syllabaire="{@refSyllab}" ref-unicode="{@refUnicode}"><xsl:value-of select="."/></w>
     
   </xsl:template>
 
Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-edition-xtz-cuneiform.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-edition-xtz-cuneiform.xsl	(revision 1653)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-edition-xtz-cuneiform.xsl	(revision 1654)
@@ -262,8 +262,11 @@
 	                		<unicode>
 	                			<xsl:choose>
 	                				<xsl:when test="contains(following-sibling::txm:ana[@type='#ref-unicode'],'&amp;')">
-	                					<char><xsl:call-template name="hex2num"><xsl:with-param name="hex"><xsl:value-of select="substring-before(substring(following-sibling::txm:ana[@type='#ref-unicode'],4),'&amp;')"/></xsl:with-param></xsl:call-template></char>
-	                					<char><xsl:call-template name="hex2num"><xsl:with-param name="hex"><xsl:value-of select="substring-after(following-sibling::txm:ana[@type='#ref-unicode'],'&amp;U+')"/></xsl:with-param></xsl:call-template></char>
+	                					<xsl:for-each select="tokenize(substring(following-sibling::txm:ana[@type='#ref-unicode'],2),'&amp;')">
+	                						<char><xsl:call-template name="hex2num"><xsl:with-param name="hex"><xsl:value-of select="substring-after(.,'U+')"/></xsl:with-param></xsl:call-template></char>
+	                					</xsl:for-each>
+<!--	                					<char><xsl:call-template name="hex2num"><xsl:with-param name="hex"><xsl:value-of select="substring-before(substring(following-sibling::txm:ana[@type='#ref-unicode'],4),'&amp;')"/></xsl:with-param></xsl:call-template></char>
+	                					<char><xsl:call-template name="hex2num"><xsl:with-param name="hex"><xsl:value-of select="substring-after(following-sibling::txm:ana[@type='#ref-unicode'],'&amp;U+')"/></xsl:with-param></xsl:call-template></char>-->
 	                				</xsl:when>
 	                				<xsl:otherwise><char><xsl:call-template name="hex2num"><xsl:with-param name="hex"><xsl:value-of select="substring(following-sibling::txm:ana[@type='#ref-unicode'],4)"/></xsl:with-param></xsl:call-template></char></xsl:otherwise>
 	                			</xsl:choose>
@@ -275,7 +278,12 @@
 	                	
 	                	<!--<xsl:value-of select="codepoints-to-string($unicode)"/>-->
 	                	<xsl:for-each select="$unicode-chars/char">
-	                		<xsl:value-of select="codepoints-to-string(.)"/>
+	                		<xsl:choose>
+	                			<!--<xsl:when test="number(.) = 74034">xxx</xsl:when>-->
+	                			<xsl:when test="number(.) gt 50"><xsl:value-of select="codepoints-to-string(.)"/><!--[<xsl:value-of select="."/>]--></xsl:when>
+	                			<xsl:otherwise>[?]</xsl:otherwise>
+	                		</xsl:choose>
+	                		
 	                		<!--<xsl:value-of select="."/>-->
 	                	</xsl:for-each>
                 </xsl:template>
Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-split-teicorpus.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-split-teicorpus.xsl	(revision 0)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-split-teicorpus.xsl	(revision 1654)
@@ -0,0 +1,73 @@
+<!-- The Identity Transformation -->
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xd="http://www.pnp-software.com/XSLTdoc"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xd:doc type="stylesheet">
+    <xd:short>
+      This stylesheet is designed for TXM XTZ+CSV import module to split a
+      single file containing a teiCorpus into individual files for each TEI
+      child. This stylesheet should be used at "1-split-merge" step. See 
+      TXM User Manual for more details 
+      (http://textometrie.ens-lyon.fr/spip.php?rubrique64)
+    </xd:short>
+    <xd:detail>
+      This stylesheet is free software; you can redistribute it and/or
+      modify it under the terms of the GNU Lesser General Public
+      License as published by the Free Software Foundation; either
+      version 3 of the License, or (at your option) any later version.
+      
+      This stylesheet is distributed in the hope that it will be useful,
+      but WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Lesser General Public License for more details.
+      
+      You should have received a copy of GNU Lesser Public License with
+      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+    </xd:detail>
+    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+    <xd:copyright>2017, CNRS / UMR 5317 IHRIM (CACTUS research group)</xd:copyright>
+  </xd:doc>
+
+<xsl:param name="output-directory">
+  <xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.[^/.]+$">
+    <xsl:matching-substring>
+      <xsl:value-of select="regex-group(1)"/>
+    </xsl:matching-substring>
+  </xsl:analyze-string>
+</xsl:param>
+
+  <xsl:variable name="filename">
+    <xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.[^/.]+$">
+      <xsl:matching-substring>
+        <xsl:value-of select="regex-group(2)"/>
+      </xsl:matching-substring>
+    </xsl:analyze-string>
+  </xsl:variable>
+
+<xsl:template match="*:teiCorpus">
+  <xsl:for-each select="descendant::*:TEI">
+    <xsl:variable name="position" as="xs:integer">
+      <xsl:number level="any"/>
+    </xsl:variable>
+    <xsl:variable name="result-filename">
+      <xsl:choose>
+        <xsl:when test="descendant::*:text[1]/@*:id">
+          <xsl:value-of select="descendant::*:text[1]/@*:id"/>
+        </xsl:when>
+        <xsl:when test="@*:id">
+          <xsl:value-of select="@*:id"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="concat($filename,'-',format-number($position,'0000'))"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:result-document href="{$output-directory}/{$result-filename}.xml">
+      <xsl:copy-of select="."></xsl:copy-of>
+    </xsl:result-document>
+  </xsl:for-each>
+</xsl:template>
+
+
+</xsl:stylesheet>

Property changes on: tmp/org.txm.core/res/org/txm/xml/xsl/txm-split-teicorpus.xsl
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: tmp/org.txm.core/res/org/txm/xml/xsl/2-default-pager.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/2-default-pager.xsl	(revision 1653)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/2-default-pager.xsl	(revision 1654)
@@ -2,48 +2,66 @@
 <xsl:stylesheet exclude-result-prefixes="#all"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:xd="http://www.pnp-software.com/XSLTdoc"
   version="2.0">
-  <!--
-This software is dual-licensed:
+    
 
-1. Distributed under a Creative Commons Attribution-ShareAlike 3.0
-Unported License http://creativecommons.org/licenses/by-sa/3.0/ 
+  <xd:doc type="stylesheet">
+    <xd:short>
+      This stylesheet is designed for TXM XTZ import module to create 
+      HTML editions of corpus texts. This stylesheet should be used at 
+      "4-edition" step and must be accompanied by 1-default-html.xsl. 
+      See TXM User Manual for more details 
+      (http://textometrie.ens-lyon.fr/spip.php?rubrique64)
+    </xd:short>
+    <xd:detail>
+      This software is dual-licensed:
+      
+      1. Distributed under a Creative Commons Attribution-ShareAlike 3.0
+      Unported License http://creativecommons.org/licenses/by-sa/3.0/ 
+      
+      2. http://www.opensource.org/licenses/BSD-2-Clause
+      
+      All rights reserved.
+      
+      Redistribution and use in source and binary forms, with or without
+      modification, are permitted provided that the following conditions are
+      met:
+      
+      * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+      
+      * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+      
+      This software is provided by the copyright holders and contributors
+      "as is" and any express or implied warranties, including, but not
+      limited to, the implied warranties of merchantability and fitness for
+      a particular purpose are disclaimed. In no event shall the copyright
+      holder or contributors be liable for any direct, indirect, incidental,
+      special, exemplary, or consequential damages (including, but not
+      limited to, procurement of substitute goods or services; loss of use,
+      data, or profits; or business interruption) however caused and on any
+      theory of liability, whether in contract, strict liability, or tort
+      (including negligence or otherwise) arising in any way out of the use
+      of this software, even if advised of the possibility of such damage.
+      
+      $Id$
+      
+      This stylesheet is based on TEI processpb.xsl by Sebastian Rahtz 
+      available at 
+      https://github.com/TEIC/Stylesheets/blob/master/tools/processpb.xsl 
+      
+      and is adapted by Alexei Lavrentiev to split an HTML edition for 
+      TXM platform.
+    </xd:detail>
+    <xd:author>Sebastian Rahtz and Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+    <xd:copyright>2017, CNRS / UMR 5317 IHRIM (CACTUS research group)</xd:copyright>
+  </xd:doc>
 
-2. http://www.opensource.org/licenses/BSD-2-Clause
-		
-All rights reserved.
+  <!--
 
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-This software is provided by the copyright holders and contributors
-"as is" and any express or implied warranties, including, but not
-limited to, the implied warranties of merchantability and fitness for
-a particular purpose are disclaimed. In no event shall the copyright
-holder or contributors be liable for any direct, indirect, incidental,
-special, exemplary, or consequential damages (including, but not
-limited to, procurement of substitute goods or services; loss of use,
-data, or profits; or business interruption) however caused and on any
-theory of liability, whether in contract, strict liability, or tort
-(including negligence or otherwise) arising in any way out of the use
-of this software, even if advised of the possibility of such damage.
-
-     $Id$
-     
-This stylesheet is based on TEI processpb.xsl by Sebastian Rahtz 
-available at 
-https://github.com/TEIC/Stylesheets/blob/master/tools/processpb.xsl 
-and is adapted by Alexei Lavrentiev to split an HTML edition for 
-TXM platform.
-
   -->
   <xsl:output indent="no" method="html"/>
   
@@ -71,7 +89,7 @@
   </xsl:variable>
   
   <xsl:variable name="current-corpus-name">
-    <xsl:analyze-string select="$current-file-directory" regex="^(.*)/([^/]+)$">
+    <xsl:analyze-string select="$current-file-directory" regex="^(.*)/([^/]+)/[^/]+$">
       <xsl:matching-substring>
         <xsl:value-of select="regex-group(2)"/>
       </xsl:matching-substring>
Index: tmp/org.txm.core/res/org/txm/xml/xsl/ts2xmlw.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/ts2xmlw.xsl	(revision 1653)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/ts2xmlw.xsl	(revision 1654)
@@ -82,3 +82,4 @@
   </xsl:template>
 
 </xsl:stylesheet>
+
Index: tmp/org.txm.core/res/org/txm/xml/xsl/1-default-html.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/1-default-html.xsl	(revision 1653)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/1-default-html.xsl	(revision 1654)
@@ -4,8 +4,37 @@
 	xmlns:tei="http://www.tei-c.org/ns/1.0" 
 	xmlns:txm="http://textometrie.org/1.0"
 	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	xmlns:xd="http://www.pnp-software.com/XSLTdoc"
                 exclude-result-prefixes="#all" version="2.0">
                 
+	<xd:doc type="stylesheet">
+		<xd:short>
+			This stylesheet is designed for TXM XTZ import module to create 
+			HTML editions of corpus texts. This stylesheet should be used at 
+			"4-edition" step and must be accompanied by 2-default-pager.xsl. 
+			See TXM User Manual for more details 
+			(http://textometrie.ens-lyon.fr/spip.php?rubrique64)
+		</xd:short>
+		<xd:detail>
+			This stylesheet is free software; you can redistribute it and/or
+			modify it under the terms of the GNU Lesser General Public
+			License as published by the Free Software Foundation; either
+			version 3 of the License, or (at your option) any later version.
+			
+			This stylesheet is distributed in the hope that it will be useful,
+			but WITHOUT ANY WARRANTY; without even the implied warranty of
+			MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+			Lesser General Public License for more details.
+			
+			You should have received a copy of GNU Lesser Public License with
+			this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+		</xd:detail>
+		<xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+		<xd:copyright>2017, CNRS / UMR 5317 IHRIM (CACTUS research group)</xd:copyright>
+	</xd:doc>
+                
+                
+                
 	<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="no"/>
 	
 	<!-- <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="no"  doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> -->
@@ -38,7 +67,7 @@
                 </xsl:variable>
 	
 	<xsl:variable name="filename">
-		<xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.[^/]+$">
+		<xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.[^/.]+$">
 			<xsl:matching-substring>
 				<xsl:value-of select="regex-group(2)"/>
 			</xsl:matching-substring>
@@ -77,10 +106,31 @@
 				</div>
 				
 			</xsl:if>
-			<xsl:apply-templates/>		
+			<xsl:apply-templates/>
+			
+			<xsl:variable name="page_id"><xsl:value-of select="count(descendant::*[local-name()=$pagination-element])"/></xsl:variable>
+			
+			<xsl:if test="//tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))][count(preceding::*[local-name()=$pagination-element]) = $page_id]">
+				<xsl:text>&#xa;</xsl:text>
+				<br/>
+				<br/>			
+				<span style="display:block;border-top-style:solid;border-top-width:1px;border-top-color:gray;padding-top:5px">                                                
+					<xsl:for-each select="//tei:note[count(preceding::*[local-name()=$pagination-element]) = $page_id]">
+						<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note) + 1"/></xsl:variable>
+						<!--<p><xsl:value-of select="$note_count"/>. <a href="#noteref_{$note_count}" name="note_{$note_count}">[<xsl:value-of select="preceding::tei:cb[1]/@xml:id"/>, l. <xsl:value-of select="preceding::tei:lb[1]/@n"/>]</a><xsl:text> </xsl:text> <xsl:value-of select="."/></p>-->
+						<span class="note">
+							<span style="position:absolute;left:-30px"><a href="#noteref_{$note_count}" name="note_{$note_count}"><xsl:value-of select="$note_count"/></a>. </span>
+							<xsl:apply-templates mode="#current"/>
+						</span>                                                                
+					</xsl:for-each></span><xsl:text>&#xa;</xsl:text>                                                                
+				
+			</xsl:if>
+			
+			
 		</body>
 	</xsl:template>
 	
+	
                 <xsl:template match="*">
                                 <xsl:choose>
                                 	<xsl:when test="descendant::tei:p|descendant::tei:ab">
@@ -226,8 +276,8 @@
 			<br/>
 			<br/>			
 			<span style="display:block;border-top-style:solid;border-top-width:1px;border-top-color:gray;padding-top:5px">                                                
-				<xsl:for-each select="//tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))][following::*[local-name()=$pagination-element][1][count(preceding::*[local-name()=$pagination-element]) = $page_id]]">
-					<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note[matches(@type,'^(apparat|identification|zoologique)$')]) + 1"/></xsl:variable>
+				<xsl:for-each select="//tei:note[following::*[local-name()=$pagination-element][1][count(preceding::*[local-name()=$pagination-element]) = $page_id]]">
+					<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note) + 1"/></xsl:variable>
 					<!--<p><xsl:value-of select="$note_count"/>. <a href="#noteref_{$note_count}" name="note_{$note_count}">[<xsl:value-of select="preceding::tei:cb[1]/@xml:id"/>, l. <xsl:value-of select="preceding::tei:lb[1]/@n"/>]</a><xsl:text> </xsl:text> <xsl:value-of select="."/></p>-->
 					<span class="note">
 						<span style="position:absolute;left:-30px"><a href="#noteref_{$note_count}" name="note_{$note_count}"><xsl:value-of select="$note_count"/></a>. </span>
@@ -249,7 +299,7 @@
 	<!-- Notes -->
 	<xsl:template match="tei:note">
 		<!--<span style="color:violet"> [<b>Note :</b> <xsl:apply-templates/>] </span>-->	
-		<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note[matches(@type,'^(apparat|identification|zoologique)$')]) + 1"/></xsl:variable>
+		<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note) + 1"/></xsl:variable>
 		<xsl:variable name="note_content">
 			<xsl:choose>
 				<xsl:when test="descendant::txm:form">
Index: tmp/org.txm.core/res/org/txm/xml/xsl/txm-front-teiHeader2textAtt.xsl
===================================================================
--- tmp/org.txm.core/res/org/txm/xml/xsl/txm-front-teiHeader2textAtt.xsl	(revision 1653)
+++ tmp/org.txm.core/res/org/txm/xml/xsl/txm-front-teiHeader2textAtt.xsl	(revision 1654)
@@ -1,49 +1,37 @@
 <?xml version="1.0"?>
 <xsl:stylesheet xmlns:edate="http://exslt.org/dates-and-times"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0"
+  xmlns:xd="http://www.pnp-software.com/XSLTdoc"
   exclude-result-prefixes="tei edate" xpath-default-namespace="http://www.tei-c.org/ns/1.0" version="2.0">
 
-  <!--
-This software is dual-licensed:
+  <xd:doc type="stylesheet">
+    <xd:short>
+      This stylesheet is designed for TXM XTZ+CSV import module to extract 
+      metadata from the teiHeader and add them as attributes
+      of the text element. It should be used at "2-front" step. See TXM 
+      User Manual for more details 
+      (http://textometrie.ens-lyon.fr/spip.php?rubrique64)
+    </xd:short>
+    <xd:detail>
+      This stylesheet is free software; you can redistribute it and/or
+      modify it under the terms of the GNU Lesser General Public
+      License as published by the Free Software Foundation; either
+      version 3 of the License, or (at your option) any later version.
+      
+      This stylesheet is distributed in the hope that it will be useful,
+      but WITHOUT ANY WARRANTY; without even the implied warranty of
+      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+      Lesser General Public License for more details.
+      
+      You should have received a copy of GNU Lesser Public License with
+      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
+    </xd:detail>
+    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
+    <xd:copyright>2017, CNRS / UMR 5317 IHRIM (CACTUS research group)</xd:copyright>
+  </xd:doc>
 
-1. Distributed under a Creative Commons Attribution-ShareAlike 3.0
-Unported License http://creativecommons.org/licenses/by-sa/3.0/ 
 
-2. http://www.opensource.org/licenses/BSD-2-Clause
-		
-All rights reserved.
 
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-This software is provided by the copyright holders and contributors
-"as is" and any express or implied warranties, including, but not
-limited to, the implied warranties of merchantability and fitness for
-a particular purpose are disclaimed. In no event shall the copyright
-holder or contributors be liable for any direct, indirect, incidental,
-special, exemplary, or consequential damages (including, but not
-limited to, procurement of substitute goods or services; loss of use,
-data, or profits; or business interruption) however caused and on any
-theory of liability, whether in contract, strict liability, or tort
-(including negligence or otherwise) arising in any way out of the use
-of this software, even if advised of the possibility of such damage.
-
-     
-This stylesheet extracts metadata from the teiHeader and adds them as attributes
-of the text element. Can be used with TXM XTZ and XML/W import modules.
-
-Written by Alexei Lavrentiev, UMR 5317 IHRIM, 2017
-  -->
-
-
   <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/> 
   
   
Index: tmp/org.txm.libs.cqp.linux/res/linux64/cqp
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.libs.cqp.linux/res/linux64/cqpserver
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.libs.cqp.linux/res/linux64/libcqpjni.so
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java
===================================================================
--- tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java	(revision 1653)
+++ tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java	(revision 1654)
@@ -1,6 +1,7 @@
 package org.txm.groovy.core;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.logging.Level;
@@ -141,10 +142,7 @@
 					Log.fine(GroovyMessages.errorImportNotCorrectlyEndedSeeConsoleMessages);
 					
 					if (!project.getDoUpdate()) { // clear all
-						Log.fine("Deleting all project children...");
-						for (TXMResult c : project.getChildren()) {
-							c.delete();
-						}
+						project.deleteChildren();
 					} else {
 						Log.fine("Deleting all project CorpusBuild & Edition children...");
 						for (TXMResult c : project.getChildren(CorpusBuild.class)) {
