
Property changes on: tmp/trunk/org.txm.setups/shared/debian/usr/lib/TXM/jre
___________________________________________________________________
Added: svn:ignore
   + **


Index: tmp/trunk/org.txm.setups/shared/all/doc/Manuel de TXM 0.7 FR.pdf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tmp/trunk/org.txm.setups/shared/all/doc
___________________________________________________________________
Added: svn:ignore
   + *.pdf


Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xtz-cuneiform.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xtz-cuneiform.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xtz-cuneiform.xsl	(revision 729)
@@ -1,327 +0,0 @@
-<?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:txm="http://textometrie.org/1.0"
-	exclude-result-prefixes="#all" version="2.0">
-	
-	<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"/>
-	
-	<xsl:strip-space elements="*"/>
-	
-	<xsl:param name="editionpagetag">pb</xsl:param>
-	
-	<xsl:param name="textcontainer">text</xsl:param>
-	
-	<!--<xsl:param name="frontmatter"></xsl:param>
-	
-	<xsl:param name="backmatter">back</xsl:param>-->
-	
-	<xsl:variable name="inputtype">
-		<xsl:choose>
-			<xsl:when test="//tei:w//txm:form">xmltxm</xsl:when>
-			<xsl:otherwise>xmlw</xsl:otherwise>
-		</xsl:choose>
-	</xsl:variable>
-	
-	<xsl:template match="/">
-		<html>
-			<head>
-				<title><xsl:value-of select="//tei:text[1]/@id"/></title>
-				<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
-			</head>
-			<body>
-				<a class="txm-page" title="1"/>
-				<div class="metadata-page">
-					<h1><xsl:value-of select="//tei:text[1]/@id"></xsl:value-of></h1>
-					<br/>
-					<table>
-						<xsl:for-each select="//tei:text[1]/@*">
-							<tr>
-								<td><xsl:value-of select="name()"/></td>
-								<td><xsl:value-of select="."/></td>
-							</tr>
-						</xsl:for-each>
-					</table>
-					<br/>
-					<br/>
-				</div>
-				<xsl:apply-templates select="descendant::*[local-name()=$textcontainer]"/>
-				
-				
-<!--				<xsl:if test="//tei:note[not(@place='inline') and not(matches(@type,'intern|auto')) and not(following::*[local-name()=$editionpagetag]) and preceding::*[local-name()=$editionpagetag]]">
-					<br/>
-					<br/>			
-					<span class="footnotes">
-					<xsl:for-each select="//tei:note[not(@place='inline') and not(matches(@type,'intern|auto')) and not(following::*[local-name()=$editionpagetag]) and preceding::*[local-name()=$editionpagetag]]">
-						<xsl:variable name="note_count">
-							<xsl:value-of select="count(preceding::tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))]) + 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 class="footnotenumber"><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:if>
--->				
-			</body>
-		</html>
-	</xsl:template>
-	
-	<xsl:template match="//*[local-name()=$textcontainer]">
-		<xsl:variable name="pbcount"></xsl:variable>
-		
-		<div class="text" style="margin-left:60px;">
-			<xsl:apply-templates/>
-		</div>
-	</xsl:template>
-	
-		
-	
-	<xsl:template match="*">
-		<xsl:choose>
-			<xsl:when test="descendant::tei:p|descendant::tei:ab">
-				<div>
-					<xsl:call-template name="addClass"/>
-					<xsl:apply-templates/></div>
-				<xsl:text>&#xa;</xsl:text>
-			</xsl:when>
-			<xsl:otherwise><span>
-				<xsl:call-template name="addClass"/>
-				<xsl:if test="self::tei:add[@del]">
-					<xsl:attribute name="title"><xsl:value-of select="@del"/></xsl:attribute>
-				</xsl:if>
-				<xsl:apply-templates/></span>
-				<!--<xsl:call-template name="spacing"/>-->
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-	
-	<xsl:template match="@*|processing-instruction()|comment()">
-		<!--<xsl:copy/>-->
-	</xsl:template>
-	
-	<!--                <xsl:template match="comment()">
-                                <xsl:copy/>
-                </xsl:template>
--->                
-	<xsl:template match="text()">
-		<xsl:value-of select="normalize-space(.)"/>
-	</xsl:template>
-	
-	<xsl:template name="addClass">
-		<xsl:attribute name="class">
-			<xsl:value-of select="local-name(.)"/>
-			<xsl:if test="@type"><xsl:value-of select="concat('-',@type)"/></xsl:if>
-			<xsl:if test="@subtype"><xsl:value-of select="concat('-',@subtype)"/></xsl:if>
-			<xsl:if test="@rend"><xsl:value-of select="concat('-',@rend)"/></xsl:if>
-		</xsl:attribute>                	
-	</xsl:template>
-	
-<!--	<xsl:template match="tei:p|tei:ab">
-		<p>
-			<xsl:call-template name="addClass"/>
-			<xsl:apply-templates/>
-		</p>
-		<xsl:text>&#xa;</xsl:text>
-	</xsl:template>-->
-	
-	<xsl:template match="//word">
-		<xsl:choose>
-			<xsl:when test="@line = preceding::word[1]/@line"><xsl:text> </xsl:text></xsl:when>
-			<xsl:otherwise><br/><xsl:text>&#xa;</xsl:text><span style="position:relative"><span class="linenumber" style="position:absolute;width:40px;left:-50px;padding-right:20px;text-align:right"><xsl:value-of select="@line"/>&#xa0;</span></span></xsl:otherwise>
-		</xsl:choose>
-		<span>
-			<xsl:call-template name="addClass"/>
-			<xsl:apply-templates/>
-		</span>
-	</xsl:template>
-	
-	
-	
-	<!-- Page breaks -->                
-	<xsl:template match="//*[local-name()=$editionpagetag]">
-		<xsl:variable name="editionpagetype">
-			<xsl:choose>
-				<xsl:when test="ancestor::tei:ab">editionpageverse</xsl:when>
-				<xsl:otherwise>editionpage</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		<xsl:variable name="pagenumber">
-			<xsl:choose>
-				<xsl:when test="@n"><xsl:value-of select="@n"/></xsl:when>
-				<xsl:when test="@facs"><xsl:value-of select="substring-before(@facs,'.')"/></xsl:when>
-				<xsl:otherwise>[NN]</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		
-		<xsl:variable name="page_id"><xsl:value-of select="count(preceding::*[local-name()=$editionpagetag])"/></xsl:variable>
-		<xsl:if test="@break='no'"><span class="hyphen">-</span></xsl:if>
-		<xsl:if test="//tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))][following::*[local-name()=$editionpagetag][1][count(preceding::*[local-name()=$editionpagetag]) = $page_id]]">
-			<xsl:text>&#xa;</xsl:text>
-			<br/>
-			<br/>			
-			<span class="footnotes">
-				<xsl:for-each select="//tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))][following::*[local-name()=$editionpagetag][1][count(preceding::*[local-name()=$editionpagetag]) = $page_id]]">
-					<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note[not(@place='inline')]) + 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 class="footnotenumber"><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>                                
-		
-		<xsl:text>&#xa;</xsl:text>
-		<br/><xsl:text>&#xa;</xsl:text>
-		<a class="txm-page" title="{count(preceding::*[local-name()=$editionpagetag]) + 2}"/>
-		<span class="{$editionpagetype}"> - <xsl:value-of select="$pagenumber"/> - </span><br/><xsl:text>&#xa;</xsl:text>
-	</xsl:template>
-	
-	<!-- Notes -->
-<!--	<xsl:template match="tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))]">
-		<!-\-<span style="color:violet"> [<b>Note :</b> <xsl:apply-templates/>] </span>-\->	
-		<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))]) + 1"/></xsl:variable>
-		<a title="{.}" class="noteref" href="#note_{$note_count}" name="noteref_{$note_count}">[<xsl:value-of select="$note_count"/>]</a>
-		<xsl:call-template name="spacing"/>                                
-	</xsl:template>
--->	
-	
-	<xsl:template match="//w"><span class="w" style="font-family:Santakku">
-		<xsl:variable name="unicode-chars" as="element()">
-			<unicode>
-				<xsl:choose>
-					<xsl:when test="contains(@ref-unicode,'&amp;')">
-						<char><xsl:call-template name="hex2num"><xsl:with-param name="hex"><xsl:value-of select="substring-before(substring(@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(@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(@ref-unicode,4)"/></xsl:with-param></xsl:call-template></char></xsl:otherwise>
-				</xsl:choose>
-			</unicode>
-		</xsl:variable>
-		<xsl:if test="@id">
-			<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
-		</xsl:if>
-		<xsl:attribute name="title">
-			<xsl:choose>
-				<xsl:when test="descendant::txm:ana">
-					<xsl:for-each select="descendant::txm:ana">
-						<xsl:value-of select="concat(substring(@type,2),': ',.,' ; ')"/>				
-					</xsl:for-each>
-					<xsl:value-of select="concat('translit : ',descendant::txm:form)"/>
-				</xsl:when>
-				<xsl:otherwise>
-					<xsl:for-each select="@*">
-						<xsl:value-of select="concat(name(),': ',.,' ; ')"/>				
-					</xsl:for-each>
-					<xsl:value-of select="concat('translit : ',.)"/>
-				</xsl:otherwise>
-			</xsl:choose>
-
-		</xsl:attribute>
-		<xsl:choose>
-			<xsl:when test="descendant::txm:form">
-				<xsl:apply-templates select="txm:form"/>
-			</xsl:when>
-			<xsl:otherwise>
-				<!--<xsl:value-of select="codepoints-to-string($unicode)"/>-->
-				<xsl:for-each select="$unicode-chars/char">
-					<xsl:value-of select="codepoints-to-string(.)"/>
-				</xsl:for-each>
-			</xsl:otherwise>
-		</xsl:choose>
-		
-	</span>
-		<!--<xsl:if test="following-sibling::tei:w"></xsl:if>-->
-	</xsl:template>
-	
-	<xsl:template name="hex2num">
-		<xsl:param name="hex"/>
-		<xsl:param name="num" select="0"/>
-		<xsl:param name="MSB" select="translate(substring($hex, 1, 1), 'abcdef', 'ABCDEF')"/>
-		<xsl:param name="value" select="string-length(substring-before('0123456789ABCDEF', $MSB))"/>
-		<xsl:param name="result" select="16 * $num + $value"/>
-		<xsl:choose>
-			<xsl:when test="string-length($hex) > 1">
-				<xsl:call-template name="hex2num">
-					<xsl:with-param name="hex" select="substring($hex, 2)"/>
-					<xsl:with-param name="num" select="$result"/>
-				</xsl:call-template>
-			</xsl:when>
-			<xsl:otherwise>
-				<xsl:value-of select="$result"/>
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-	
-	
-	                <xsl:template match="//txm:form">
-	                	<xsl:variable name="unicode-chars" as="element()">
-	                		<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: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>
-	                		</unicode>
-	                	</xsl:variable>
-	                	<!--<xsl:variable name="unicode">
-	                		<xsl:call-template name="hex2num"><xsl:with-param name="hex"><xsl:value-of select="ancestor::w/substring(child::txm:ana[@type='#ref-unicode'],4)"/></xsl:with-param></xsl:call-template>			
-	                	</xsl:variable>-->
-	                	
-	                	<!--<xsl:value-of select="codepoints-to-string($unicode)"/>-->
-	                	<xsl:for-each select="$unicode-chars/char">
-	                		<xsl:value-of select="codepoints-to-string(.)"/>
-	                		<!--<xsl:value-of select="."/>-->
-	                	</xsl:for-each>
-                </xsl:template>
-                
-<!--	<xsl:template name="spacing">
-		<xsl:choose>
-			<xsl:when test="$inputtype='xmltxm'">
-				<xsl:call-template name="spacing-xmltxm"/>
-			</xsl:when>
-			<xsl:otherwise>
-				<xsl:call-template name="spacing-xmlw"/>
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-
-	<xsl:template name="spacing-xmlw">
-		<xsl:choose>
-			<xsl:when test="ancestor::tei:w"/>
-			<xsl:when test="following::tei:w[1][matches(.,'^\s*[.,)\]]+\s*$')]"/>			
-			<xsl:when test="matches(.,'^\s*[(\[]+$|\w(''|’)\s*$')"></xsl:when>
-			<xsl:when test="position()=last() and (ancestor::tei:choice or ancestor::tei:supplied[not(@rend='multi_s')])"></xsl:when>
-			<xsl:when test="following-sibling::*[1][self::tei:note]"></xsl:when>
-			<xsl:when test="following::tei:w[1][matches(.,'^\s*[:;!?]+\s*$')]">
-				<xsl:text>&#xa0;</xsl:text>
-			</xsl:when>
-			<xsl:otherwise>
-				<xsl:text> </xsl:text>
-			</xsl:otherwise>
-		</xsl:choose>                
-	</xsl:template>
-	
-	<xsl:template name="spacing-xmltxm">
-		<xsl:choose>
-			<xsl:when test="ancestor::tei:w"/>
-			<xsl:when test="following::tei:w[1][matches(descendant::txm:form[1],'^[.,)\]]+$')]"/>			
-			<xsl:when test="matches(descendant::txm:form[1],'^[(\[]+$|\w(''|’)$')"></xsl:when>
-			<xsl:when test="position()=last() and (ancestor::tei:choice or ancestor::tei:supplied[not(@rend='multi_s')])"></xsl:when>
-			<xsl:when test="following-sibling::*[1][self::tei:note]"></xsl:when>
-			<xsl:when test="following::tei:w[1][matches(descendant::txm:form[1],'^[:;!?]+$')]">
-				<xsl:text>&#xa0;</xsl:text>
-			</xsl:when>
-			<xsl:otherwise>
-				<xsl:text> </xsl:text>
-			</xsl:otherwise>
-		</xsl:choose>                
-	</xsl:template>-->
-	
-	
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/filter-out-sp.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/filter-out-sp.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/filter-out-sp.xsl	(revision 729)
@@ -1,46 +0,0 @@
-<?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 suppression de certains éléments XML à utiliser comme
-      prétraitement de l'import 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>Serge Heiden slh@ens-lyon.fr</xd:author>
-    <xd:copyright>2013, CNRS / ICAR (ICAR3 LinCoBaTO)</xd:copyright>
-  </xd:doc>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
-
-  <xsl:template match="@*|node()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()" />
-    </xsl:copy>
-  </xsl:template>
-  
-  <!-- On supprime tous les <sp> dont l'attribut @who vaut 'enqueteur' -->
-  
-  <xsl:template match="//sp[@who='enqueteur']">    
-      <!--<xsl:copy-of select="."/>-->    
-  </xsl:template>
-	
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teitextgrid-xmlw-posttok.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teitextgrid-xmlw-posttok.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teitextgrid-xmlw-posttok.xsl	(revision 729)
@@ -1,142 +0,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:edate="http://exslt.org/dates-and-times"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xd="http://www.pnp-software.com/XSLTdoc" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:txm="http://textometrie.org/1.0"
-  exclude-result-prefixes="tei edate txm" xpath-default-namespace="http://www.tei-c.org/ns/1.0" version="2.0">
-
-  <xd:doc type="stylesheet">
-    <xd:short>
-      This stylesheet is used on tokenized DARIAH-DE TextGrid files
-      in the TXM XML/w + csv import process.
-    </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>2014, CNRS / ICAR (CACTUS)</xd:copyright>
-  </xd:doc>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/> 
-
-  <!-- By default, copy all attributes, comments, processing instructions and text nodes -->
-
-  <xsl:template match="@*|comment()|processing-instruction()">
-    <xsl:copy/>
-  </xsl:template>
-  
-  <xsl:template match="text()">
-    <xsl:value-of select="."/>
-  </xsl:template>
-  
-  <!-- delete the teiHeader for xml/w import module-->
-  
-  <xsl:template match="teiHeader"/>
-  
-  
-<!-- The page breaks must be placed before the structural units (text divions) that 
-    start on a given page (to avoid empty elements creation when splitting the pages of the
-    TXM edition) -->
-
-  <xsl:template match="text">
-    <xsl:copy>
-      <xsl:apply-templates select="@*"/>
-      <xsl:if test="not(child::*[1][self::pb])"><pb xmlns="http://www.tei-c.org/ns/1.0" n="title"/></xsl:if>
-      <xsl:apply-templates/>
-    </xsl:copy>
-  </xsl:template>  
-
-  <xsl:template match="*">    
-    <xsl:if test="descendant::tei:pb and (parent::tei:text or preceding-sibling::*)">
-      <!-- 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="tei:pb[not(preceding-sibling::*) and not(parent::tei:text)]">
-    <xsl:comment>Pb déplacé plus haut</xsl:comment>
-  </xsl:template>
-  
-  <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>
-  
-  
-<!-- add @ref to words (for concordances) -->
-
-  <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="w">
-    <xsl:variable name="ref">
-      <xsl:choose>
-        <xsl:when test="preceding::pb[1][@n]">
-          <xsl:value-of select="concat($filename,', p. ',preceding::pb[1]/@n)"/>
-        </xsl:when>
-        <xsl:otherwise><xsl:value-of select="$filename"/></xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-        <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}">
-          <xsl:apply-templates select="@*"/>
-          <xsl:apply-templates select="*|processing-instruction()|comment()|text()"/>
-        </w>
-  </xsl:template>
-
-<!-- transform speaker into an attribute of the sp element -->
-
-  <xsl:template match="sp">
-    <xsl:copy>
-      <xsl:if test="child::speaker">
-        <xsl:variable name="who">
-          <xsl:value-of select="speaker"/>
-        </xsl:variable>
-        <xsl:attribute name="who"><xsl:value-of select="normalize-space(replace($who,'\s*\p{P}+\s*$',''))"/></xsl:attribute>
-        <xsl:apply-templates/>
-      </xsl:if>
-    </xsl:copy>
-  </xsl:template>
-  
-  <xsl:template match="speaker"/>
-  
-
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xmltxm-textgrid.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xmltxm-textgrid.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xmltxm-textgrid.xsl	(revision 729)
@@ -1,290 +0,0 @@
-<?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:txm="http://textometrie.org/1.0"
-                exclude-result-prefixes="#all" version="2.0">
-                
-	<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"/>
-                
-                <xsl:strip-space elements="*"/>
-                
-                <xsl:template match="/">
-                	<html>
-                		<head>
-                			<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/txm-textgrid.css" />
-                			<style type="text/css">
-                				.verseline:before {
-                				position:absolute;
-                				left:-50px;
-                				top:-14px;
-                				width:25px;
-                				text-align:right;
-                				color:gray;
-                				content:attr(title);
-                				}
-                				.editionpage {
-                				page-break-before:always;                                
-                				color:gray;
-                				display:block;
-                				text-align:center;
-                				}
-                				.editionpageverse {
-                				position:relative;
-                				left:-5%;
-                				page-break-before:always;                                
-                				color:gray;
-                				display:block;
-                				text-align:center;
-                				}
-                				.noteinline {
-                				color:gray;                                
-                				}
-                				.head {
-                				color:indigo;
-                				font-weight:bold;
-                				}
-                				.speaker {
-                				color:darkblue;
-                				}
-                			</style>
-<!--                			<title>
-                				<xsl:if test="$author[not(contains(.,'anonym'))]">
-                					<xsl:value-of select="$author"/><xsl:text> : </xsl:text>
-                				</xsl:if>
-                				<xsl:value-of select="$title-normal"/>
-                			</title>                                                                -->
-                		</head>
-                			<xsl:apply-templates select="descendant::tei:text"/>
-                	</html>
-                </xsl:template>
-
-<xsl:template match="tei:text">
-	<body>
-		<a class="txm-page" title="1">&#xa0;</a>
-		<div class="metadata-page">
-			<h1><xsl:value-of select="@id"></xsl:value-of></h1>
-			<br/>
-			<table>
-				<xsl:for-each select="@*">
-					<tr>
-						<td><xsl:value-of select="name()"/></td>
-						<td><xsl:value-of select="."/></td>
-					</tr>
-				</xsl:for-each>
-			</table>
-		</div>
-		<xsl:apply-templates/>		
-	</body>
-</xsl:template>
-
-                <xsl:template match="*">
-                                <xsl:choose>
-                                	<xsl:when test="descendant::tei:p|descendant::tei:ab|descendant::tei:lg">
-                                		<div>
-                                			<xsl:call-template name="addClass"/>
-                                			<xsl:call-template name="checkId"/>
-                                			<xsl:apply-templates/></div>
-                                		<xsl:text>&#xa;</xsl:text>
-                                	</xsl:when>
-                                	<xsl:otherwise><span>
-                                		<xsl:call-template name="addClass"/>
-                                		<xsl:call-template name="checkId"/>
-<!--                                		<xsl:if test="self::tei:add[@del]">
-                                			<xsl:attribute name="title"><xsl:value-of select="@del"/></xsl:attribute>
-                                		</xsl:if>-->
-                                		<xsl:apply-templates/></span>
-                                	<xsl:call-template name="spacing-xmltxm"/>
-                                	</xsl:otherwise>
-                                </xsl:choose>
-                </xsl:template>
-                
-                <xsl:template match="@*|processing-instruction()|comment()">
-                                <!--<xsl:copy/>-->
-                </xsl:template>
-                
-<!--                <xsl:template match="comment()">
-                                <xsl:copy/>
-                </xsl:template>
--->                
-                <xsl:template match="text()">
-                                <xsl:value-of select="."/>
-                </xsl:template>
-                
-                <xsl:template name="addClass">
-                	<xsl:attribute name="class">
-                		<xsl:value-of select="local-name(.)"/>
-                		<xsl:if test="@type"><xsl:value-of select="concat('-',@type)"/></xsl:if>
-                		<xsl:if test="@subtype"><xsl:value-of select="concat('-',@subtype)"/></xsl:if>
-                		<!--<xsl:if test="@rend"><xsl:value-of select="concat('-',@rend)"/></xsl:if>-->
-                	</xsl:attribute>                	
-                </xsl:template>
-                
-                <xsl:template name="checkId">
-                	<xsl:if test="@xml:id">
-                		<xsl:attribute name="id"><xsl:value-of select="@xml:id"/></xsl:attribute>
-                	</xsl:if>
-                	
-                </xsl:template>
-                <xsl:template match="tei:p|tei:ab|tei:lg">
-                	<p>
-                		<xsl:call-template name="addClass"/>
-                		<xsl:call-template name="checkId"/>
-                		<xsl:apply-templates/>
-                	</p>
-                	<xsl:text>&#xa;</xsl:text>
-                </xsl:template>
-	
-	<xsl:template match="tei:l">
-		<xsl:if test="preceding-sibling::*">
-			<br/>
-		</xsl:if>
-		<span class="l"><xsl:apply-templates/></span>
-	</xsl:template>
-	
-	<xsl:template match="tei:head">
-		<xsl:variable name="level">
-			<xsl:value-of select="count(ancestor::tei:div) + 1"/>
-		</xsl:variable>
-		<xsl:element name="h{$level}">
-			<xsl:call-template name="addClass"/>
-			<xsl:call-template name="checkId"/>
-			<xsl:apply-templates/>			
-		</xsl:element>
-<!--		<h2>
-			<xsl:call-template name="addClass"/>
-			<xsl:apply-templates/>
-		</h2>-->
-	</xsl:template>
-                
-	<xsl:template match="//tei:lb">
-		<xsl:variable name="lbcount">
-			<xsl:choose>
-				<xsl:when test="ancestor::tei:ab"><xsl:number from="tei:ab" level="any"/></xsl:when>
-				<xsl:when test="ancestor::tei:p"><xsl:number from="tei:p" level="any"/></xsl:when>
-				<xsl:otherwise>999</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		<xsl:if test="not($lbcount=1) or preceding-sibling::node()[matches(.,'\S')]"><br/><xsl:text>&#xa;</xsl:text></xsl:if>
-		<xsl:if test="@n and not(@rend='prose')">
-			<xsl:choose>
-				<xsl:when test="matches(@n,'^[0-9]*[05]$')">
-					<a title="{@n}" class="verseline" style="position:relative">&#xa0;</a>
-				</xsl:when>
-				<xsl:when test="matches(@n,'[^0-9]')">
-					<a title="{@n}" class="verseline" style="position:relative">&#xa0;</a>
-				</xsl:when>
-				<xsl:otherwise>
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:if>
-	</xsl:template>
-	
-	<!-- Page breaks -->                
-	<xsl:template match="//tei:pb[not(following-sibling::tei:cb)]">
-		<xsl:variable name="editionpagetype">
-			<xsl:choose>
-				<xsl:when test="ancestor::tei:ab">editionpageverse</xsl:when>
-				<xsl:otherwise>editionpage</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		<xsl:variable name="pagenumber">
-			<xsl:choose>
-				<xsl:when test="@n"><xsl:value-of select="@n"/></xsl:when>
-				<xsl:when test="@facs"><xsl:value-of select="substring-before(@facs,'.')"/></xsl:when>
-				<xsl:otherwise>[NN]</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		<xsl:variable name="page_id"><xsl:value-of select="count(preceding::tei:pb)"/></xsl:variable>
-		<xsl:if test="//tei:ref[@type='noteAnchor'][following::tei:pb[1][count(preceding::tei:pb) = $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:ref[@type='noteAnchor'][following::tei:pb[1][count(preceding::tei:pb) = $page_id]]">
-					<span class="footnote">
-						<xsl:apply-templates mode="#current" select="id(substring-after(@target,'#'))"/>
-					</span>                                                                
-				</xsl:for-each></span><xsl:text>&#xa;</xsl:text>                                                                
-			
-			
-		</xsl:if>
-	<!--	<xsl:if test="//tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))][following::tei:pb[1][count(preceding::tei:pb) = $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[not(@place='inline') and not(matches(@type,'intern|auto'))][following::tei:pb[1][count(preceding::tei:pb) = $page_id]]">
-					<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note[not(@place='inline')]) + 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>-->                                
-		
-		<xsl:text>&#xa;</xsl:text>
-		<br/><xsl:text>&#xa;</xsl:text>
-		<a class="txm-page" title="{count(preceding::tei:pb) + 2}">&#xa0;</a>
-		<span class="{$editionpagetype}"> - <xsl:value-of select="$pagenumber"/> - </span><br/><xsl:text>&#xa;</xsl:text>
-	</xsl:template>
-	
-	<!-- Notes -->
-	<xsl:template match="tei:ref[@type='noteAnchor']">
-		<a title="{id(substring-after(@target,'#'))//txm:form}" style="font-size:75%;position:relative;top:-5px" href="{@target}"><xsl:value-of select="descendant::txm:form"/></a>
-		<xsl:call-template name="spacing-xmltxm"/>                                
-	</xsl:template>
-	
-                
-                <xsl:template match="//tei:w"><span class="w">
-                                                <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
-                                	<xsl:attribute name="title">
-                                		<xsl:if test="ancestor::tei:corr">
-                                			<xsl:value-of select="concat(' sic : ',descendant::txm:ana[@type='#sic'])"/>
-                                		</xsl:if>
-                                		<xsl:if test="ancestor::tei:reg">
-                                			<xsl:value-of select="concat(' orig : ',descendant::txm:ana[@type='#orig'])"/>
-                                		</xsl:if>
-                                		<xsl:if test="descendant::txm:ana[matches(@type,'pos$')]">
-                                			<xsl:for-each select="descendant::txm:ana[matches(@type,'pos$')]">
-                                				<xsl:value-of select="concat(' ',substring-after(@type,'#'),' : ',.)"/>
-                                			</xsl:for-each>
-                                		</xsl:if>                                		
-                                	</xsl:attribute>
-                                                <!--<xsl:copy-of select="@*"/>-->
-                                                <xsl:apply-templates select="txm:form"/>
-                                </span><xsl:call-template name="spacing-xmltxm"></xsl:call-template></xsl:template>
-                
-                <xsl:template match="//txm:form">
-                                <xsl:apply-templates/>
-                </xsl:template>
-                
-                
-                <xsl:template match="tei:sp[not(descendant::tei:speaker)]">
-                	<div class="sp">
-                		<span class="speaker"><xsl:value-of select="@who"></xsl:value-of></span>
-                		<xsl:apply-templates/>
-                	</div>
-                </xsl:template>
-	
-	
-	<xsl:template name="spacing-xmltxm">
-		<xsl:choose>
-			<xsl:when test="ancestor::tei:w"/>
-			<xsl:when test="following::tei:w[1][matches(descendant::txm:form,'^[.,)\]]+$')]"/>			
-			<xsl:when test="matches(descendant::txm:form[1],'^[(\[]+$|\w(''|’)$')"></xsl:when>
-			<xsl:when test="position()=last() and (ancestor::tei:choice or ancestor::tei:supplied[not(@rend='multi_s')])"></xsl:when>
-			<xsl:when test="following-sibling::*[1][self::tei:note]"></xsl:when>
-			<xsl:when test="following::tei:w[1][matches(descendant::txm:form,'^[:;!?]+$')]">
-				<xsl:text>&#xa0;</xsl:text>
-			</xsl:when>
-			<xsl:otherwise>
-				<xsl:text> </xsl:text>
-			</xsl:otherwise>
-		</xsl:choose>                
-	</xsl:template>
-	
-                
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/ts2xmlw.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/ts2xmlw.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/ts2xmlw.xsl	(revision 729)
@@ -1,84 +0,0 @@
-<?xml version="1.0"?>
-<xsl:stylesheet version="1.0"
-                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:edate="http://exslt.org/dates-and-times"
-                exclude-result-prefixes="edate xd">
-
-  <xd:doc type="stylesheet">
-
-    <xd:short>
-      Feuille de transformation du format TIGER-XML vers le format XML-TXM
-    </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>Matthieu Decorde, matthieu.decorde AT ens-lyon.fr</xd:author>
-    <xd:author>Serge Heiden, slh AT ens-lyon.fr</xd:author>
-    <xd:author>Alexey Lavrentev, alexei.lavrentev AT ens-lyon.fr></xd:author>
-
-    <xd:copyright>2016, ENS de Lyon/CNRS (UMR IHRIM Cactus)</xd:copyright>
-
-  </xd:doc>
-  
-  <xsl:output 
-   method="xml"
-   encoding="UTF-8"
-   indent="yes" />
-
-  <xsl:template match="corpus">
-    <corpus>
-    	<xsl:choose>
-    		<xsl:when test="subcorpus">
-    			<xsl:apply-templates select="subcorpus"/>
-    		</xsl:when>
-    		<xsl:otherwise>
-    			<text>
-    				<xsl:apply-templates select="s"/>
-    			</text>			
-    		</xsl:otherwise>
-    	</xsl:choose>
-    	<xsl:apply-templates/>
-    </corpus>
-  </xsl:template>
-  
-  <xsl:template match="subcorpus">
-    <text>
-	<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
-	<xsl:apply-templates select="s"/>
-    </text>
-  </xsl:template>
-  
-  <xsl:template match="s">
-	<p>
-	  <s>
-	    <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
-	      <xsl:apply-templates select="graph/terminals/t" />
-	  </s>
-	</p>
-  </xsl:template>
-
-  <xsl:template match="t">
-		<w>
-			<xsl:for-each select="@*[not(name()='word')]">
-				<xsl:copy/>
-			</xsl:for-each>
-	        <xsl:value-of select="@word"/>
-		</w>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/filter-out-p.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/filter-out-p.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/filter-out-p.xsl	(revision 729)
@@ -1,46 +0,0 @@
-<?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 suppression de certains éléments XML à utiliser comme
-      prétraitement de l'import 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>Serge Heiden slh@ens-lyon.fr</xd:author>
-    <xd:copyright>2013, CNRS / ICAR (ICAR3 LinCoBaTO)</xd:copyright>
-  </xd:doc>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
-
-  <xsl:template match="@*|node()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()" />
-    </xsl:copy>
-  </xsl:template>
-  
-<!-- On supprime tous les <p> dont l'attribut @type vaut 'ouverture' -->
-  
-  <xsl:template match="//p[@type='ouverture']">    
-      <!--<xsl:copy-of select="."/>-->    
-  </xsl:template>
-	
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/identity.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/identity.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/identity.xsl	(revision 729)
@@ -1,11 +0,0 @@
-<!-- The Identity Transformation -->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  <!-- 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:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-corpusakkadien-xmlw_mots_effaces.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-corpusakkadien-xmlw_mots_effaces.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-corpusakkadien-xmlw_mots_effaces.xsl	(revision 729)
@@ -1,93 +0,0 @@
-<?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>
-      Cette feuille de style permet de préparer les transcriptions de tablettes
-      d'argile (projet UMR PROCLAC) à l'import XML/W + CSV de TXM en créant les
-      propriétés de mots "no-unclear" et "non-supplied" pour éliminer les formes
-      non présentes ou peu lisibles dans les sources.
-    </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>2014-2015, CNRS / ICAR (équipe CACTUS)</xd:copyright>
-  </xd:doc>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
-
-  <xsl:template match="@*|*">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()" />
-    </xsl:copy>
-  </xsl:template>
-  
-  <xsl:template match="@*|*" mode="nosupplied">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()" />
-    </xsl:copy>
-  </xsl:template>
-  
-  <xsl:template match="@*|*" mode="nounclear">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()" />
-    </xsl:copy>
-  </xsl:template>
-  
-  <xsl:template match="*[local-name()='teiHeader']"/>
-  
-  <xsl:template match="text()" mode="#all">
-    <xsl:choose>
-      <xsl:when test="ancestor::*[local-name()='w']">
-        <xsl:value-of select="."/>
-      </xsl:when>
-      <xsl:otherwise/>
-    </xsl:choose>
-  </xsl:template>
-  
-  <!-- On supprime les mots qui sont illisibles dans la source et on ajoute une propriété lexicale
-  qui correspond à la lisibilité -->
-  
-  <xsl:template match="//*[local-name()='w']">
-        <xsl:copy>
-          <xsl:apply-templates select="@*"/>
-          <xsl:attribute name="no-supplied">
-            <xsl:choose>
-              <xsl:when test="ancestor::*[local-name()='supplied']">¤</xsl:when>
-              <xsl:otherwise><xsl:apply-templates mode="nosupplied"/></xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-          <xsl:attribute name="no-unclear">
-            <xsl:choose>
-              <xsl:when test="ancestor::*[local-name()='supplied'] or ancestor::*[local-name()='unclear']">¤</xsl:when>
-              <xsl:otherwise><xsl:apply-templates mode="nounclear"/></xsl:otherwise>
-            </xsl:choose>
-          </xsl:attribute>
-          <xsl:apply-templates/>
-        </xsl:copy>
-  </xsl:template>
-  
-  <xsl:template match="*[local-name()='supplied']" mode="nosupplied"/>
-  
-  <xsl:template match="*[local-name()='supplied']" mode="nounclear"/>
-  
-  <xsl:template match="*[local-name()='unclear']" mode="nounclear"/>
-	
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-rnc-xmlw.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-rnc-xmlw.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-rnc-xmlw.xsl	(revision 729)
@@ -1,35 +0,0 @@
-<?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"
-  exclude-result-prefixes="tei edate" version="2.0">
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-
-  <xsl:template match="*">
-
-         <xsl:element name="{local-name(.)}">
-          <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-        </xsl:element>
-
-  </xsl:template>
-
-  <xsl:template match="@*|processing-instruction()|comment()">
-    <xsl:copy/>
-  </xsl:template>
-
-<xsl:template match="head"/>
-  
-<xsl:template match="w">
-  <xsl:element name="w">
-    <xsl:attribute name="lex"><xsl:value-of select="child::ana/@lex"/></xsl:attribute>
-    <xsl:attribute name="gr"><xsl:value-of select="child::ana/@gr"/></xsl:attribute>
-    <xsl:attribute name="withstress"><xsl:value-of select="normalize-space(child::text())"/></xsl:attribute>
-    <xsl:value-of select="replace(child::text(),'`','')"/>
-  </xsl:element>
-</xsl:template>
-
-  <xsl:template match="text()">
-    <xsl:value-of select="."/>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/filter-keep-only-select.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/filter-keep-only-select.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/filter-keep-only-select.xsl	(revision 729)
@@ -1,82 +0,0 @@
-<?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 suppression de tous les éléments XML sauf "select",
-      à utiliser comme prétraitement de l'import XML/w+CSV.
-      
-      Pour changer le nom de la balise à conserver, mettez le nouveau nom
-      à la place de "select" dans la balise <xsl:param/> ci-dessous. Vous pouvez 
-      mettre plusieurs noms en les séparant par une barre verticale. Vous 
-      pouvez également indiquer le(s) nom(s) de balises à conserver comme un 
-      paramètre au lancement de cette feuille de style
-      
-      L'espace de nommage de la balise à conserver n'est pas pris en compte.
-    </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>2013, CNRS / ICAR (ICAR3 LinCoBaTO)</xd:copyright>
-  </xd:doc>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-	
-	<!-- Mettez le nom de la balise à conserver à la place de "select" ci-dessous -->
-	<xsl:param name="tagToKeep">select</xsl:param>
-
-	<xsl:variable name="tagToKeepStrict"><xsl:value-of select="concat('^',$tagToKeep,'$')"/></xsl:variable>
-
-  <xsl:template match="@*|node()">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()" />
-    </xsl:copy>
-  </xsl:template>
-
-
-<xsl:template match="/">
-  <xsl:apply-templates select="processing-instruction()"/>
-  <xsl:choose>
-    <xsl:when test="descendant::*[matches(local-name(),$tagToKeepStrict)]">
-      <xsl:apply-templates mode="with-select"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-  <xsl:template match="*" mode="with-select">
-    <xsl:choose>
-    	<xsl:when test="ancestor-or-self::*[matches(local-name(),$tagToKeepStrict)]">
-        <xsl:copy>
-          <xsl:apply-templates select="@*|node()"/>
-        </xsl:copy>      
-      </xsl:when>
-    	<xsl:when test="descendant::*[matches(local-name(),$tagToKeepStrict)]">
-        <xsl:copy>
-          <xsl:apply-templates select="@*"/>
-        	<xsl:apply-templates select="*[descendant-or-self::*[matches(local-name(),$tagToKeepStrict)]]" mode="with-select"/>
-        </xsl:copy>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:template>  
-  
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-page-split.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-page-split.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-page-split.xsl	(revision 729)
@@ -1,193 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xsl:stylesheet
-		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-		version="2.0" xpath-default-namespace="http://www.w3.org/1999/xhtml">
-<!--
-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.
-
-  -->
-  <xsl:output indent="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
-  <xsl:param name="cssname-txm">txm</xsl:param>
-	<xsl:param name="cssname">tei</xsl:param>
-	<xsl:param name="editionname">default</xsl:param>
-
-  <xsl:template match="html/body">
-      <xsl:variable name="pages">
-	<xsl:copy>
-	  <xsl:apply-templates select="@*"/>
-	  <xsl:apply-templates
-	      select="*|processing-instruction()|comment()|text()"/>
-	</xsl:copy>
-      </xsl:variable>
-      <xsl:for-each select="$pages">
-	<xsl:apply-templates  mode="pass2"/>
-      </xsl:for-each>
-    <!-- creating title page with metadata -->
-  </xsl:template>
-
-
- <!-- first (recursive) pass. look for <pb> elements and group on them -->
-  <xsl:template match="comment()|@*|processing-instruction()|text()">
-    <xsl:copy-of select="."/>
-  </xsl:template>
-
-  <xsl:template match="*">
-    <xsl:call-template name="checkpb">
-      <xsl:with-param name="eName" select="local-name()"/>
-    </xsl:call-template>
-  </xsl:template>
-
-  <xsl:template match="a[@class='txm-page']">
-    <a xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:copy-of select="@*"/>
-    </a>
-  </xsl:template>
-
-  <xsl:template name="checkpb">
-    <xsl:param name="eName"/>
-    <xsl:choose>
-      <xsl:when test="not(.//a[@class='txm-page'])">
-        <xsl:copy-of select="."/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:variable name="pass">
-	  <xsl:call-template name="groupbypb">
-	    <xsl:with-param name="Name" select="$eName"/>
-	  </xsl:call-template>
-        </xsl:variable>
-	<xsl:for-each select="$pass">
-	  <xsl:apply-templates/>
-	</xsl:for-each>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-  <xsl:template name="groupbypb">
-    <xsl:param name="Name"/>
-    <xsl:for-each-group select="node()" group-starting-with="a[@class='txm-page']">
-      <xsl:choose>
-        <xsl:when test="self::a[@class='txm-page']">
-          <xsl:copy-of select="."/>
-          <xsl:element name="{$Name}" namespace="http://www.w3.org/1999/xhtml">
-	    <xsl:attribute name="rend">CONTINUED</xsl:attribute>
-            <xsl:apply-templates select="current-group() except ."/>
-          </xsl:element>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:element name="{$Name}" namespace="http://www.w3.org/1999/xhtml">
-            <xsl:for-each select="..">
-              <xsl:copy-of select="@*"/>
-              <xsl:apply-templates select="current-group()"/>
-            </xsl:for-each>
-          </xsl:element>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each-group>
-  </xsl:template>
-
-  <!-- second pass. group by <pb> (now all at top level) and wrap groups
-       in <page> -->
-  <xsl:template match="*" mode="pass2">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|*|processing-instruction()|comment()|text()" mode="pass2"/>
-    </xsl:copy>
-  </xsl:template>
-
-  <xsl:template match="comment()|@*|processing-instruction()|text()" mode="pass2">
-    <xsl:copy-of select="."/>
-  </xsl:template>
-
-	<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:variable name="filedir">
-		<xsl:analyze-string select="document-uri(.)" regex="^(.*)/([^/]+)\.[^/]+$">
-			<xsl:matching-substring>
-				<xsl:value-of select="regex-group(1)"/>
-			</xsl:matching-substring>
-		</xsl:analyze-string>
-	</xsl:variable>
-	
-	
-<!--	<xsl:variable name="style">
-	  <xsl:copy-of select="/html/head[1]/style[1]"></xsl:copy-of>
-	</xsl:variable>-->
-
-  <xsl:template match="*[a[@class='txm-page']]" mode="pass2" >
-    <xsl:copy>
-      <xsl:apply-templates select="@*"/>
-      <xsl:for-each-group select="*" group-starting-with="a[@class='txm-page']">
-        <xsl:choose>
-          <xsl:when test="self::a[@class='txm-page']">
-          	<xsl:comment> Page <xsl:value-of select="@title"/> déplacée vers <xsl:value-of select="concat($filedir,'/',$editionname,'/',$filename,'_',@title,'.html')"/></xsl:comment>
-          	<xsl:result-document href="{$filedir}/{$editionname}/{$filename}_{@title}.html">
-          	<html>
-          		<head>
-          			<title><xsl:value-of select="concat($filename,', Page ',@title)"/></title>
-          			<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
-          			<link rel="stylesheet" media="all" type="text/css" href="css/{$cssname-txm}.css"/>
-          			<xsl:if test="matches($cssname,'\S')"><link rel="stylesheet" media="all" type="text/css" href="css/{$cssname}.css"/></xsl:if>
-          		  <!--<xsl:copy-of select="$style"/>-->
-          		</head>
-          		<body>
-          		  <div class="txmeditionpage">
-          			  <xsl:copy-of select="current-group() except ."/>
-          			</div>
-          		</body>
-          	</html>
-          	</xsl:result-document>
-
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:copy-of select="current-group()"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:for-each-group>
-    </xsl:copy>
-  </xsl:template>
-
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-qgraal_cm-xmlw.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-qgraal_cm-xmlw.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-qgraal_cm-xmlw.xsl	(revision 729)
@@ -1,175 +0,0 @@
-<?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:me="http://www.menota.org/ns/1.0"
-  xmlns:bfm="http://bfm.ens-lsh.fr/ns/1.0"
-  exclude-result-prefixes="tei edate bfm me" version="1.0">
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-  
-  <xsl:strip-space elements="me:norm tei:w"/>
-
-<!-- Original version -->
-<!--  <xsl:template match="*">
-    <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>
-  -->
-  <!-- Eliminating all namespaces and comments -->
-  <xsl:template match="*">
-        <xsl:element namespace="http://www.tei-c.org/ns/1.0" name="{local-name(.)}">
-          <xsl:apply-templates select="*|@*|processing-instruction()|text()"/>
-        </xsl:element>
-  </xsl:template>
-  
-  
-  <xsl:template match="@*|processing-instruction()">
-    <xsl:copy/>
-  </xsl:template>
-
-<xsl:template match="processing-instruction('oxygen')"/>
-
-  <xsl:template match="text()">
-    <xsl:value-of select="."/>
-  </xsl:template>
-
-  <xsl:template match="//tei:TEI">
-    <xsl:element name="TEI" namespace="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates/>
-    </xsl:element>
-  </xsl:template>
-  
-  <xsl:template match="tei:teiHeader"/>
-  
-  <xsl:template match="tei:text">
-    <xsl:element name="text" namespace="http://www.tei-c.org/ns/1.0">
-<xsl:attribute name="idbfm"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title[@type='reference']"/></xsl:attribute>
-<!--<xsl:attribute name="deaf"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:fileDesc/tei:sourceDesc/tei:biblFull/tei:publicationStmt/tei:idno[@type='sigle_DEAF']"/></xsl:attribute>-->
-<xsl:attribute name="titre"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title[@type='normal']"/></xsl:attribute>
-<xsl:attribute name="auteur"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:author"/></xsl:attribute>
-<xsl:attribute name="siecle"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:date[@type='compo']/@n"/></xsl:attribute>
-<xsl:attribute name="ssiecle"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:date[@type='compo_sous_siecle']/@n"/></xsl:attribute>
-<xsl:attribute name="datecompolibre"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:date[@type='compo']"/></xsl:attribute>
-<xsl:attribute name="datecompo"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:date[@type='compo']/@when"/></xsl:attribute>
-<!--<xsl:attribute name="notbefore"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:date[@type='compo']/@notBefore"/></xsl:attribute>
-<xsl:attribute name="notafter"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:date[@type='compo']/@notAfter"/></xsl:attribute>
-<xsl:attribute name="msdatelibre"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:date[@type='ms']"/></xsl:attribute>
-<xsl:attribute name="msdate"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:date[@type='ms']/@when"/></xsl:attribute>
-<xsl:attribute name="msnotbefore"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:date[@type='ms']/@notBefore"/></xsl:attribute>
-<xsl:attribute name="msnotafter"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:date[@type='ms']/@notAfter"/></xsl:attribute>-->
-<xsl:attribute name="forme"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:textClass/tei:catRef/@target[contains(.,'forme')]"/></xsl:attribute>
-<xsl:attribute name="domaine"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:textDesc/tei:domain/@type"/></xsl:attribute>
-<xsl:attribute name="genre"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:textDesc/@n"/></xsl:attribute>
-<xsl:attribute name="dialecte"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:creation/tei:region[@type='dialecte_auteur']"/></xsl:attribute>
-<!--<xsl:attribute name="morphosynt"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:revisionDesc/tei:change[contains(.,'étiquetage morpho')]"/></xsl:attribute>
-<xsl:attribute name="restrictions"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:fileDesc/tei:publicationStmt/tei:availability/tei:ab[@type='availability_txmweb']/@subtype"/></xsl:attribute>
-<xsl:attribute name="relation"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:profileDesc/tei:textDesc/tei:derivation/@type"/></xsl:attribute>
-<xsl:attribute name="edsci"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:fileDesc/tei:sourceDesc/tei:biblFull/tei:titleStmt/tei:respStmt[contains(.,'Éditeur scientifique')]/tei:name"/></xsl:attribute>
-<xsl:attribute name="edcomm"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:fileDesc/tei:sourceDesc/tei:biblFull/tei:publicationStmt/tei:publisher"/></xsl:attribute>
-<xsl:attribute name="edville"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:fileDesc/tei:sourceDesc/tei:biblFull/tei:publicationStmt/tei:pubPlace"/></xsl:attribute>
-<xsl:attribute name="eddate"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:fileDesc/tei:sourceDesc/tei:biblFull/tei:publicationStmt/tei:date"/></xsl:attribute>
-<xsl:attribute name="ednum"><xsl:value-of select="ancestor::tei:TEI/tei:teiHeader/tei:fileDesc/tei:sourceDesc/tei:biblFull/tei:editionStmt/tei:edition"/></xsl:attribute>-->
-     <xsl:apply-templates/> 
-    </xsl:element>
-  </xsl:template>
-
-<xsl:template match="//tei:w">
-  <xsl:element name="w" namespace="http://www.tei-c.org/ns/1.0">
-    <xsl:apply-templates select="@*[not(name()='type')]"/>
-    <xsl:attribute name="pos"><xsl:value-of select="@type"/></xsl:attribute>
-    <xsl:attribute name="dipl"><xsl:apply-templates select="descendant::me:dipl"/></xsl:attribute>
-    <xsl:attribute name="ref"><xsl:value-of select="concat('graal_cm, col. ',substring-after(preceding::tei:cb[1]/@xml:id,'col_'),', l. ',preceding::tei:lb[1]/@n)"/></xsl:attribute>
-    <xsl:attribute name="q">
-      <xsl:value-of select="count(ancestor::tei:q)"/>
-    </xsl:attribute>
-    <xsl:apply-templates/>
-  </xsl:element>
-</xsl:template>
-
-  <xsl:template match="//tei:choice[parent::tei:w]">
-    <xsl:choose>
-      <xsl:when test="descendant::me:norm">
-        <xsl:apply-templates select="me:norm"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates select="me:facs"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  <xsl:template match="me:dipl">
-    <xsl:for-each select="child::node()">
-      <xsl:choose>
-        <xsl:when test="self::tei:ex">
-          <xsl:value-of select="concat('‹',.,'›')"/>
-        </xsl:when>
-        <xsl:otherwise><xsl:value-of select="normalize-space(.)"/></xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-  </xsl:template>
-  
-  
-  <xsl:template match="//tei:choice[descendant::tei:w]">
-    <xsl:apply-templates select="tei:corr|tei:reg"/>
-  </xsl:template>
-  
-  <xsl:template match="//tei:surplus"/>
-  
-  <xsl:template match="//tei:del"/>
-  
-  <xsl:template match="//tei:note"/>
-  
-  <xsl:variable name="apostrophe" select='"&apos;"'/>
-
-<xsl:template match="@bfm:aggl">
-  <xsl:attribute name="rend"><xsl:value-of select="."/></xsl:attribute>
-</xsl:template>
-
-  <xsl:template match="me:norm|me:facs">
-    <xsl:apply-templates/>
-    <!-- added 2011-02-10 -->
-    <xsl:if test="ancestor::tei:w[@*='elision'] and not(substring(., string-length(.))=$apostrophe)">
-      <xsl:text>'</xsl:text>
-    </xsl:if>
-  </xsl:template>
-  
-<!--  <xsl:template match="tei:milestone[@unit='column']">
-    <xsl:element name="pb" namespace="http://www.tei-c.org/ns/1.0">      
-      <xsl:attribute name="n"><xsl:value-of select="substring-after(@xml:id,'col_')"/></xsl:attribute>
-    </xsl:element>
-  </xsl:template>
-  
-  <xsl:template match="tei:pb[@ed='#Pauphilet1923']">
-    <xsl:element name="milestone" namespace="http://www.tei-c.org/ns/1.0">
-      <xsl:attribute name="unit">page-Pauphilet</xsl:attribute>
-      <xsl:attribute name="n"><xsl:value-of select="@n"/></xsl:attribute>
-    </xsl:element>
-  </xsl:template>-->
-
-<xsl:template match="tei:cb[@rend='hidden']"/>
-
-  <xsl:template match="tei:cb[not(@rend='hidden')]">
-    <xsl:element name="pb" namespace="http://www.tei-c.org/ns/1.0">      
-      <xsl:attribute name="n"><xsl:value-of select="substring-after(@xml:id,'col_')"/></xsl:attribute>
-    </xsl:element>
-  </xsl:template>
-  
-  <xsl:template match="tei:pb"/>
-  
-  
-  <xsl:template match="bfm:sb"/>
-  
-  <xsl:template match="tei:lb[@ed='#facs']"/>
-  
-
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teiperseus-xmlw.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teiperseus-xmlw.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teiperseus-xmlw.xsl	(revision 729)
@@ -1,57 +0,0 @@
-<?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">
-  
-  <xsl:import href="txm-filter-teip5-xmlw-preserve.xsl"/>
-  <xd:doc type="stylesheet">
-    <xd:short>
-      A stylesheet to prepare PERSEUS XML-TEI texts to TXM import.
-    </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>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-  
-  <xsl:template match="//tei:text">
-    <xsl:copy>
-      <xsl:copy-of select="@*"/>
-      <xsl:attribute name="author"><xsl:value-of select="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:author"/></xsl:attribute>
-      <xsl:attribute name="title"><xsl:value-of select="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title[@type='work']"/></xsl:attribute>
-      <xsl:attribute name="editor"><xsl:value-of select="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:editor"/></xsl:attribute>
-      <xsl:apply-templates/>
-    </xsl:copy>
-  </xsl:template>
-  
-<xsl:template match="//tei:sp">
-  <div3 type="sp" xmlns="http://www.tei-c.org/ns/1.0">
-    <xsl:apply-templates/>    
-  </div3>
-</xsl:template>  
-
-<xsl:template match="//tei:speaker">
-  <head><xsl:apply-templates/></head>
-</xsl:template>
-  
-  <xsl:template match="//tei:bibl">
-    <note type="bibl" xmlns="http://www.tei-c.org/ns/1.0"><xsl:apply-templates/></note>
-  </xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teibrown-xmlw.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teibrown-xmlw.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teibrown-xmlw.xsl	(revision 729)
@@ -1,135 +0,0 @@
-<?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>
-      This stylesheet prepares XML-TEI P5 files of the Brown corpus
-      for TXM import with xml/w+csv module.
-      Specify the location of this file on your system in the "Front
-      XSLT" import option.
-    </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>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-  
-  
-<!--  <xsl:template match="/">
-      <xsl:apply-templates/>  
-  </xsl:template>
--->
-  
-  <xsl:template match="*">
-        <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:template>
-
-  <xsl:template match="@*|comment()">
-    <xsl:copy/>
-  </xsl:template>
-
-  <xsl:template match="text()">
-    <xsl:analyze-string select="." regex="&amp;|&lt;|&gt;|--|\*(\w+)">
-      <xsl:matching-substring>
-        <xsl:choose>
-          <xsl:when test="matches(.,'&amp;')">
-            <expan xmlns="http://www.tei-c.org/ns/1.0">and</expan>
-          </xsl:when>
-          <xsl:when test="matches(.,'&lt;')">
-            <xsl:text>[</xsl:text>
-          </xsl:when>
-          <xsl:when test="matches(.,'&gt;')">
-            <xsl:text>]</xsl:text>
-          </xsl:when>          
-          <xsl:when test="matches(.,'--')">
-            <!-- double dash provokes malformed xml in the notes in the notes placed in xml comments by the tokenizer -->
-            <xsl:text> - </xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="."/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </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()"/>
-
-<!-- teiHeader deleted for the xml/w import module -->
-  
-  <xsl:template match="tei:teiHeader">    
-      <!--<xsl:copy-of select="."/>-->    
-  </xsl:template>
-	
-	<xsl:template match="tei:text">
-		<xsl:copy>
-		<xsl:apply-templates select="@*"/>
-		<xsl:attribute name="type">
-			<xsl:choose>
-				<xsl:when test="@decls='A'">PRESS: REPORTAGE</xsl:when>
-				<xsl:when test="@decls='B'">PRESS: EDITORIAL</xsl:when>
-				<xsl:when test="@decls='C'">PRESS: REVIEWS</xsl:when>
-				<xsl:when test="@decls='D'">RELIGION</xsl:when>
-				<xsl:when test="@decls='E'">SKILL AND HOBBIES</xsl:when>
-				<xsl:when test="@decls='F'">POPULAR LORE</xsl:when>
-				<xsl:when test="@decls='G'">BELLES-LETTRES</xsl:when>
-				<xsl:when test="@decls='H'">MISCELLANEOUS: GOVERNMENT AND HOUSE ORGANS</xsl:when>
-				<xsl:when test="@decls='J'">LEARNED</xsl:when>
-				<xsl:when test="@decls='K'">FICTION: GENERAL</xsl:when>
-				<xsl:when test="@decls='L'">FICTION: MYSTERY</xsl:when>
-				<xsl:when test="@decls='M'">FICTION: SCIENCE</xsl:when>
-				<xsl:when test="@decls='N'">FICTION: ADVENTURE</xsl:when>
-				<xsl:when test="@decls='P'">FICTION: ROMANCE</xsl:when>
-				<xsl:when test="@decls='R'">HUMOR</xsl:when>				
-			</xsl:choose>
-		</xsl:attribute>
-		<xsl:apply-templates/>
-		</xsl:copy>
-	</xsl:template>
-
-<xsl:template match="@type|@pos">
-	<xsl:attribute name="type">
-		<xsl:value-of select="translate(.,' *','_')"></xsl:value-of>
-	</xsl:attribute>
-</xsl:template>
-	
-	<xsl:template match="tei:mw">
-		<w xmlns="http://www.tei-c.org/ns/1.0">
-			<xsl:apply-templates select="@*"/>
-			<xsl:apply-templates/>
-		</w>
-	</xsl:template>
-	
-	<xsl:template match="tei:c[@type='pct']">
-		<w xmlns="http://www.tei-c.org/ns/1.0">
-			<xsl:apply-templates select="@*"/>
-			<xsl:apply-templates/>
-		</w>			
-	</xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teifrantext-xmlw.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teifrantext-xmlw.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teifrantext-xmlw.xsl	(revision 729)
@@ -1,92 +0,0 @@
-<?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">
-  
-  <xsl:import href="txm-filter-teip5-xmlw-preserve.xsl"/>
-  
-  <xd:doc type="stylesheet">
-    <xd:short>
-      Feuille de style de préparation des fichiers TEI de la Revue
-      Discours à l'importation TXM dans un format xml simple. 
-    </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>
-  
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-
-  <!--<xsl:variable name="langue"><xsl:value-of select="lower-case(//tei:teiHeader[1]/tei:profileDesc[1]/tei:langUsage[1]/tei:language[1])"/></xsl:variable>-->
-
-<!-- On injecte les mots clés dans la langue de l'article et on ne garde que l'abstract dans la langue de l'article -->
-  
-  <xsl:template match="text()">
-    <xsl:analyze-string select="." regex="&amp;lt;|&amp;gt;|&amp;|&lt;|&gt;|--|\*(\w+)">
-      <xsl:matching-substring>
-        <xsl:choose>
-          <xsl:when test="matches(.,'&amp;lt;')">
-            <xsl:text>‹</xsl:text>
-          </xsl:when>
-          <xsl:when test="matches(.,'&amp;gt;')">
-            <xsl:text>›</xsl:text>
-          </xsl:when>
-          <!--          <xsl:when test="matches(.,'&amp;')">
-            <!-\-<expan xmlns="http://www.tei-c.org/ns/1.0">and</expan>-\->
-          	<xsl:text>&amp;amp;</xsl:text>
-          </xsl:when>-->
-          <xsl:when test="matches(.,'&lt;')">
-            <xsl:text>‹</xsl:text>
-          </xsl:when>
-          <xsl:when test="matches(.,'&gt;')">
-            <xsl:text>›</xsl:text>
-          </xsl:when>
-          <!-- pose problème si se trouve dans les notes transformés en commentaires xml par le tokeniseur -->
-          <xsl:when test="matches(.,'--')">
-            <xsl:text> - </xsl:text>
-          </xsl:when>
-          <!-- spécial Frantext!!! -->
-          <xsl:when test="matches(.,'\*(\w+)')">
-            <w xmlns="http://www.tei-c.org/ns/1.0" type="maj"><xsl:value-of select="regex-group(1)"/></w>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="."/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:matching-substring>
-      <xsl:non-matching-substring>         
-        <xsl:value-of select="."/>
-      </xsl:non-matching-substring>      
-    </xsl:analyze-string>
-  </xsl:template>
-  
-  <xsl:template match="tei:text">
-    <xsl:copy>
-      <xsl:apply-templates/>
-    </xsl:copy>
-  </xsl:template>
-  
-<xsl:template match="tei:div">
-  <xsl:copy>
-    <xsl:attribute name="n"><xsl:value-of select="count(preceding-sibling::tei:div) + 1"/></xsl:attribute>
-    <xsl:apply-templates select="@*"/>
-    <xsl:apply-templates/>
-  </xsl:copy>
-</xsl:template>
-  
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-corpusakkadien-xmlw_syllabes.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-corpusakkadien-xmlw_syllabes.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-corpusakkadien-xmlw_syllabes.xsl	(revision 729)
@@ -1,108 +0,0 @@
-<?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>
-      Cette feuille de style permet de préparer les transcriptions de tablettes
-      d'argile (projet UMR PROCLAC) à l'import XML/W + CSV de TXM en tokenisant
-      le corpus au niveau des syllabes.
-      Les propriétés de mots sont projetées vers les propriétés des syllabes (line,
-      lemma, pos).
-      Les propriétés unclear et supplied prennent la valeur "yes" si la syllabe se
-      trouve à l'intérieur de la balise correspondante.
-    </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>2014-2015, CNRS / ICAR (équipe CACTUS)</xd:copyright>
-  </xd:doc>
-  
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-  
-  <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="*[local-name()='teiHeader']"/>
-  
-  <xsl:template match="*[local-name()='w']//text()">
-    <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>
-    <xsl:variable name="pos"><xsl:value-of select="ancestor::*[local-name()='w']/@pos"/></xsl:variable>
-    <xsl:variable name="word-form"><xsl:value-of select="ancestor::*[local-name()='w']"/></xsl:variable>
-    <xsl:variable name="unclear">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[local-name()='unclear']">yes</xsl:when>
-        <xsl:otherwise>no</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="supplied">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[local-name()='supplied']">yes</xsl:when>
-        <xsl:otherwise>no</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    
-    <xsl:analyze-string select="." regex="[-.]|\([^\)]*\)">
-      <xsl:matching-substring>
-        <w line="{$line}" lemma="{$lemma}" pos="{$pos}" word-form="{$word-form}" supplied="{$supplied}" unclear="{$unclear}"><xsl:value-of select="."/></w>
-      </xsl:matching-substring>
-      <xsl:non-matching-substring>
-        <w line="{$line}" lemma="{$lemma}" pos="{$pos}" word-form="{$word-form}" supplied="{$supplied}" unclear="{$unclear}"><xsl:value-of select="."/></w>
-      </xsl:non-matching-substring>
-    </xsl:analyze-string>    
-  </xsl:template>
-
-<xsl:template match="text()[not(ancestor::*[local-name()='w'])]">
-  <xsl:analyze-string select="." regex="\[…\]">
-    <xsl:matching-substring>
-      <w line="¤" lemma="¤" pos="¤" word-form="¤" supplied="¤" unclear="¤"><xsl:value-of select="."/></w>
-    </xsl:matching-substring>
-    <xsl:non-matching-substring><xsl:comment><xsl:copy-of select="."/></xsl:comment></xsl:non-matching-substring>
-  </xsl:analyze-string>
-</xsl:template>
-
-  <xsl:template match="*[local-name()='w']">
-  <word>
-    <xsl:apply-templates select="@*"/>
-    <xsl:attribute name="no-supplied">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[local-name()='supplied']">¤</xsl:when>
-        <xsl:otherwise><xsl:apply-templates mode="nosupplied"/></xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-    <xsl:attribute name="no-unclear">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[local-name()='supplied'] or ancestor::*[local-name()='unclear']">¤</xsl:when>
-        <xsl:otherwise><xsl:apply-templates mode="nounclear"/></xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>    
-    <xsl:apply-templates/>
-  </word>
-</xsl:template>
-
-
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-perseustreebank-xmlw.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-perseustreebank-xmlw.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-perseustreebank-xmlw.xsl	(revision 729)
@@ -1,73 +0,0 @@
-<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-  xmlns:treebank="http://nlp.perseus.tufts.edu/syntax/treebank/1.5"
-  exclude-result-prefixes="edate xd xsi treebank" version="2.0">
-  
-  
-  <xd:doc type="stylesheet">
-    <xd:short>
-      A stylesheet to prepare PERSEUS Treebank XML texts to TXM XML/w import.
-    </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>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-  
-  <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="treebank">
-  <text type="treebank" version="{@version}" date="{normalize-space(child::date[1])}" annotator-short="{normalize-space(child::annotator[1]/short)}" annotator-name="{normalize-space(child::annotator[1]/name)}" annotator-address="{normalize-space(child::annotator[1]/address)}">
-    <xsl:apply-templates select="descendant::sentence"/>
-  </text>
-</xsl:template>
-
-<xsl:template match="annotator"/>
-  
-<xsl:template match="sentence">
-  <xsl:copy>
-    <xsl:apply-templates select="@*"/>
-    <xsl:attribute name="annotator"><xsl:value-of select="child::annotator"/></xsl:attribute>
-    <xsl:apply-templates/>
-  </xsl:copy>
-</xsl:template>
-  
-  <xsl:template match="word">
-    <w>
-      <xsl:apply-templates select="@*[not(name()='form')]"/>
-      <xsl:value-of select="@form"></xsl:value-of>
-    </w>
-  </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xtz-corpusakkadien-translit.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xtz-corpusakkadien-translit.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xtz-corpusakkadien-translit.xsl	(revision 729)
@@ -1,204 +0,0 @@
-<?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:txm="http://textometrie.org/1.0"
-	exclude-result-prefixes="#all" version="2.0">
-	
-	<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"/>
-	
-	<xsl:strip-space elements="*"/>
-	
-	<xsl:param name="editionpagetag">pb</xsl:param>
-	
-	<xsl:param name="textcontainer">text</xsl:param>
-	
-	<!--<xsl:param name="frontmatter"></xsl:param>
-	
-	<xsl:param name="backmatter">back</xsl:param>-->
-	
-	<xsl:variable name="inputtype">
-		<xsl:choose>
-			<xsl:when test="//tei:w//txm:form">xmltxm</xsl:when>
-			<xsl:otherwise>xmlw</xsl:otherwise>
-		</xsl:choose>
-	</xsl:variable>
-	
-	<xsl:template match="/">
-		<html>
-			<head>
-				<title><xsl:value-of select="//tei:text[1]/@id"/></title>
-				<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
-			</head>
-			<body>
-				<a class="txm-page" title="1"/>
-				<div class="metadata-page">
-					<h1><xsl:value-of select="//tei:text[1]/@id"></xsl:value-of></h1>
-					<br/>
-					<table>
-						<xsl:for-each select="//tei:text[1]/@*">
-							<tr>
-								<td><xsl:value-of select="name()"/></td>
-								<td><xsl:value-of select="."/></td>
-							</tr>
-						</xsl:for-each>
-					</table>
-					<br/>
-					<br/>
-				</div>
-				<xsl:apply-templates select="descendant::*[local-name()=$textcontainer]"/>
-				
-				
-			</body>
-		</html>
-	</xsl:template>
-	
-	<xsl:template match="//*[local-name()=$textcontainer]">
-		<xsl:variable name="pbcount"></xsl:variable>
-		
-		<div class="text" style="margin-left:60px;">
-			<xsl:apply-templates/>
-		</div>
-	</xsl:template>
-	
-		
-	
-	<xsl:template match="*">
-		<xsl:choose>
-			<xsl:when test="descendant::tei:p|descendant::tei:ab">
-				<div>
-					<xsl:call-template name="addClass"/>
-					<xsl:apply-templates/></div>
-				<xsl:text>&#xa;</xsl:text>
-			</xsl:when>
-			<xsl:otherwise><span>
-				<xsl:call-template name="addClass"/>
-				<xsl:if test="self::tei:add[@del]">
-					<xsl:attribute name="title"><xsl:value-of select="@del"/></xsl:attribute>
-				</xsl:if>
-				<xsl:apply-templates/></span>
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-	
-	<xsl:template match="@*|processing-instruction()|comment()">
-
-	</xsl:template>
-	
-	<xsl:template match="text()">
-		<xsl:value-of select="normalize-space(.)"/>
-	</xsl:template>
-	
-	<xsl:template name="addClass">
-		<xsl:attribute name="class">
-			<xsl:value-of select="local-name(.)"/>
-			<xsl:if test="@type"><xsl:value-of select="concat('-',@type)"/></xsl:if>
-			<xsl:if test="@subtype"><xsl:value-of select="concat('-',@subtype)"/></xsl:if>
-			<xsl:if test="@rend"><xsl:value-of select="concat('-',@rend)"/></xsl:if>
-		</xsl:attribute>                	
-	</xsl:template>
-	
-
-	
-	<xsl:template match="//word">
-		<xsl:choose>
-			<xsl:when test="@line = preceding::word[1]/@line"><xsl:text> </xsl:text></xsl:when>
-			<xsl:otherwise><br/><xsl:text>&#xa;</xsl:text><span style="position:relative"><span class="linenumber" style="position:absolute;width:40px;left:-50px;padding-right:20px;text-align:right"><xsl:value-of select="@line"/>&#xa0;</span></span></xsl:otherwise>
-		</xsl:choose>
-		<span>
-			<xsl:call-template name="addClass"/>
-			<xsl:apply-templates/>
-		</span>
-	</xsl:template>
-	
-	
-	
-	<!-- Page breaks -->                
-	<xsl:template match="//*[local-name()=$editionpagetag]">
-		<xsl:variable name="editionpagetype">
-			<xsl:choose>
-				<xsl:when test="ancestor::tei:ab">editionpageverse</xsl:when>
-				<xsl:otherwise>editionpage</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		<xsl:variable name="pagenumber">
-			<xsl:choose>
-				<xsl:when test="@n"><xsl:value-of select="@n"/></xsl:when>
-				<xsl:when test="@facs"><xsl:value-of select="substring-before(@facs,'.')"/></xsl:when>
-				<xsl:otherwise>[NN]</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		
-		<xsl:variable name="page_id"><xsl:value-of select="count(preceding::*[local-name()=$editionpagetag])"/></xsl:variable>
-		<xsl:if test="@break='no'"><span class="hyphen">-</span></xsl:if>
-		<xsl:if test="//tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))][following::*[local-name()=$editionpagetag][1][count(preceding::*[local-name()=$editionpagetag]) = $page_id]]">
-			<xsl:text>&#xa;</xsl:text>
-			<br/>
-			<br/>			
-			<span class="footnotes">
-				<xsl:for-each select="//tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))][following::*[local-name()=$editionpagetag][1][count(preceding::*[local-name()=$editionpagetag]) = $page_id]]">
-					<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note[not(@place='inline')]) + 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 class="footnotenumber"><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>                                
-		
-		<xsl:text>&#xa;</xsl:text>
-		<br/><xsl:text>&#xa;</xsl:text>
-		<a class="txm-page" title="{count(preceding::*[local-name()=$editionpagetag]) + 2}"/>
-		<span class="{$editionpagetype}"> - <xsl:value-of select="$pagenumber"/> - </span><br/><xsl:text>&#xa;</xsl:text>
-	</xsl:template>
-	
-	<!-- Notes -->
-<!--	<xsl:template match="tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))]">
-		<!-\-<span style="color:violet"> [<b>Note :</b> <xsl:apply-templates/>] </span>-\->	
-		<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))]) + 1"/></xsl:variable>
-		<a title="{.}" class="noteref" href="#note_{$note_count}" name="noteref_{$note_count}">[<xsl:value-of select="$note_count"/>]</a>
-		<xsl:call-template name="spacing"/>                                
-	</xsl:template>
--->	
-	
-	<xsl:template match="//w"><span class="w">
-		<xsl:if test="@id">
-			<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
-		</xsl:if>
-		<xsl:attribute name="title">
-			<xsl:choose>
-				<xsl:when test="descendant::txm:ana">
-					<xsl:for-each select="descendant::txm:ana">
-						<xsl:value-of select="concat(substring(@type,2),': ',.,' ; ')"/>				
-					</xsl:for-each>
-					<xsl:value-of select="concat('translit : ',descendant::txm:form)"/>
-				</xsl:when>
-				<xsl:otherwise>
-					<xsl:for-each select="@*">
-						<xsl:value-of select="concat(name(),': ',.,' ; ')"/>				
-					</xsl:for-each>
-					<xsl:value-of select="concat('translit : ',.)"/>
-				</xsl:otherwise>
-			</xsl:choose>
-
-		</xsl:attribute>
-		<xsl:choose>
-			<xsl:when test="descendant::txm:form">
-				<xsl:apply-templates select="txm:form"/>
-			</xsl:when>
-			<xsl:otherwise>
-				<xsl:value-of select="."/>
-			</xsl:otherwise>
-		</xsl:choose>
-		
-	</span>
-		<xsl:if test="following-sibling::w">-</xsl:if>
-	</xsl:template>
-	
-	
-	                <xsl:template match="//txm:form">
-	                		<xsl:value-of select="."/>
-                </xsl:template>
-                
-	
-	
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teip5-teibfm.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teip5-teibfm.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teip5-teibfm.xsl	(revision 729)
@@ -1,365 +0,0 @@
-<?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 TEI P5 à l'importation 
-      dans TXM. Permet de simplifier la structure du document afin
-      d'optimiser les index CWB
-    </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>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-  
-  <!--
-    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
-  -->
-  
-  <!-- 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:g
-    |tei:space|tei:titlePage ">
-    <xsl:call-template name="deleteAll"/>
-  </xsl:template>
-  
-  <!-- balises à supprimer, contenu à conserver -->  
-  <xsl:template match="tei:add|tei:app
-    |tei:caesura|tei:castItem|tei:castGroup[ancestor::tei:castList]
-    |tei:castList[ancestor::tei:p]|tei:cell|tei:choice|tei:cit|tei:corr|tei:date|tei:ex
-    |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:reg|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:subst|tei:term|tei:unclear">
-    <xsl:call-template name="deleteTag"/>
-  </xsl:template>
-  
-  <!-- balises à transformer en notes-->
-  <xsl:template match="tei:abbr[parent::tei:choice and not(ancestor::tei:note)]
-    |tei:bibl[not(ancestor::tei:note)]
-    |tei:del
-    |tei:orig[parent::tei:choice and not(ancestor::tei:note)]    
-    |tei:rdg[parent::tei:app and not(ancestor::tei:note)]
-    |tei:sic[parent::tei:choice and not(ancestor::tei:note)]
-    |tei:surplus[not(ancestor::tei:w)]">
-    <xsl:call-template name="makeNote"/>
-  </xsl:template>
-  
-  <!-- balises de noms à indexer -->
-  
-  <xsl:template match="tei:name
-    |tei:geogName
-    |tei:persName
-    |tei:placeName
-    |tei:roleName
-    |tei:orgName">
-    <xsl:call-template name="makeName"/>
-  </xsl:template>
-  
-  <!-- à transformer en W -->
-  
-  <xsl:template match="tei:abbr[not(parent::tei:choice)]
-    |tei:expan
-    |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 -->
-
-<!--  <xsl:template match="/">
-      <xsl:apply-templates/>  
-  </xsl:template>
--->
-  
-  <xsl:template match="*">    
-    <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()">
-    <xsl:copy/>
-  </xsl:template>
-
-  <xsl:template match="text()">
-    <xsl:analyze-string select="." regex="&amp;|&lt;|&gt;|--|\*(\w+)">
-      <xsl:matching-substring>
-        <xsl:choose>
-          <xsl:when test="matches(.,'&amp;')">
-            <expan xmlns="http://www.tei-c.org/ns/1.0">et</expan>
-          </xsl:when>
-          <xsl:when test="matches(.,'&lt;')">
-            <xsl:text>[</xsl:text>
-          </xsl:when>
-          <xsl:when test="matches(.,'&gt;')">
-            <xsl:text>]</xsl:text>
-          </xsl:when>
-          <!-- pose problème si se trouve dans les notes transformés en commentaires xml par le tokeniseur -->
-          <xsl:when test="matches(.,'--')">
-            <xsl:text> - </xsl:text>
-          </xsl:when>
-<!--          <!-\- Spécial FRANTEXT -\->
-          <xsl:when test="matches(.,'\*(\w+)')">
-            <name xmlns="http://www.tei-c.org/ns/1.0" type="maj"><xsl:value-of select="regex-group(1)"/></name>        		
-          </xsl:when>          -->
-          <xsl:otherwise>
-            <xsl:value-of select="."/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </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 ne touche pas au 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:apply-templates select="text()"/>
-    </note>
-  </xsl:template>
-  
-<!-- On supprime toutes les balises à l'intérieur des notes-->
-  <xsl:template match="tei:note">
-    <xsl:copy>
-      <xsl:apply-templates select="text()"/>
-    </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>
-    <xsl:choose>
-      <xsl:when test="descendant::tei:w or ancestor::tei:w">
-<!--            <xsl:element namespace="http://www.tei-c.org/ns/1.0" name="seg">
-              <xsl:attribute name="type"><xsl:value-of select="local-name(.)"/></xsl:attribute>
-              <xsl:apply-templates select="*|@*[not(name()='type')]|processing-instruction()|comment()|text()"/>
-            </xsl:element>
--->
-        <xsl:apply-templates/> <!-- on supprime ces balises pour éviter la réduplication des mots-->
-      </xsl:when>
-      <xsl:otherwise>
-        <w type="{$wordType}" xmlns="http://www.tei-c.org/ns/1.0"><xsl:apply-templates/></w>
-      </xsl:otherwise>
-    </xsl:choose>    
-  </xsl:template>  
-
-<xsl:template name="makeName">
-  <xsl:variable name="nameType">
-    <xsl:choose>
-      <xsl:when test="@type">
-        <xsl:choose>
-          <xsl:when test="local-name()='name'"><xsl:value-of select='@type'/></xsl:when>
-          <xsl:otherwise><xsl:value-of select="concat(local-name(),'-',@type)"/></xsl:otherwise>
-        </xsl:choose>
-      </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>
-
-<!-- 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[not(contains(@rend,'multi_s'))][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>
-              <xsl:element name="foreign" namespace="http://www.tei-c.org/ns/1.0">
-                <xsl:attribute name="lang"><xsl:value-of select="$lang"/></xsl:attribute>
-                <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>
-              </xsl:element>
-              <xsl:value-of select="regex-group(2)"/>
-              <xsl:text> </xsl:text>
-            </xsl:matching-substring>
-            <xsl:non-matching-substring>
-              <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:non-matching-substring>
-          </xsl:analyze-string>          
-        </xsl:when>
-        <xsl:when test="self::*[not(descendant::text())]">
-          <xsl:apply-templates/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:element name="foreign" namespace="http://www.tei-c.org/ns/1.0">
-            <xsl:attribute name="lang"><xsl:value-of select="$lang"/></xsl:attribute>
-            <xsl:apply-templates select="."/>          
-          </xsl:element>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-  </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>
-  
-  
-<!--  <!-\- traitement spécifique anciennes étiquettes bfm -\->
-  <xsl:template match="tei:w/@type[contains(.,'_')]">
-    <xsl:attribute name="type"><xsl:value-of select="substring-before(.,'_')"/></xsl:attribute>
-  </xsl:template>
--->
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xtz.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xtz.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-edition-xtz.xsl	(revision 729)
@@ -1,301 +0,0 @@
-<?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:txm="http://textometrie.org/1.0"
-                exclude-result-prefixes="#all" version="2.0">
-                
-	<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"/>
-                
-                <xsl:strip-space elements="*"/>
-                
-	<xsl:param name="editionpagetag">pb</xsl:param>
-                
-                <xsl:variable name="inputtype">
-                	<xsl:choose>
-                		<xsl:when test="//tei:w//txm:form">xmltxm</xsl:when>
-                		<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>
-                			<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
-                			<link rel="stylesheet" media="all" type="text/css" href="css/bvhepistemon2014.css" />
-<!--                			<title>
-                				<xsl:if test="$author[not(contains(.,'anonym'))]">
-                					<xsl:value-of select="$author"/><xsl:text> : </xsl:text>
-                				</xsl:if>
-                				<xsl:value-of select="$title-normal"/>
-                			</title>                                                                -->
-                		</head>
-                			<xsl:apply-templates select="descendant::tei:text"/>
-                	</html>
-                </xsl:template>
-
-<xsl:template match="tei:text">
-	<body>
-		<a class="txm-page" title="1"/>
-		<div class="metadata-page">
-			<h1><xsl:value-of select="@id"></xsl:value-of></h1>
-			<br/>
-			<table>
-				<xsl:for-each select="@*">
-					<tr>
-						<td><xsl:value-of select="name()"/></td>
-						<td><xsl:value-of select="."/></td>
-					</tr>
-				</xsl:for-each>
-			</table>
-		</div>
-		<xsl:apply-templates/>		
-	</body>
-</xsl:template>
-
-                <xsl:template match="*">
-                                <xsl:choose>
-                                	<xsl:when test="descendant::tei:p|descendant::tei:ab">
-                                		<div>
-                                			<xsl:call-template name="addClass"/>
-                                			<xsl:apply-templates/></div>
-                                		<xsl:text>&#xa;</xsl:text>
-                                	</xsl:when>
-                                	<xsl:otherwise><span>
-                                		<xsl:call-template name="addClass"/>
-                                		<xsl:if test="self::tei:add[@del]">
-                                			<xsl:attribute name="title"><xsl:value-of select="@del"/></xsl:attribute>
-                                		</xsl:if>
-                                		<xsl:apply-templates/></span>
-                                	<xsl:call-template name="spacing"/>
-                                	</xsl:otherwise>
-                                </xsl:choose>
-                </xsl:template>
-                
-                <xsl:template match="@*|processing-instruction()|comment()">
-                                <!--<xsl:copy/>-->
-                </xsl:template>
-                
-<!--                <xsl:template match="comment()">
-                                <xsl:copy/>
-                </xsl:template>
--->                
-                <xsl:template match="text()">
-                                <xsl:value-of select="normalize-space(.)"/>
-                </xsl:template>
-                
-                <xsl:template name="addClass">
-                	<xsl:attribute name="class">
-                		<xsl:value-of select="local-name(.)"/>
-                		<xsl:if test="@type"><xsl:value-of select="concat('-',@type)"/></xsl:if>
-                		<xsl:if test="@subtype"><xsl:value-of select="concat('-',@subtype)"/></xsl:if>
-                		<xsl:if test="@rend"><xsl:value-of select="concat('-',@rend)"/></xsl:if>
-                	</xsl:attribute>                	
-                </xsl:template>
-                
-                <xsl:template match="tei:p|tei:ab|tei:lg">
-                	<p>
-                		<xsl:call-template name="addClass"/>
-                		<xsl:apply-templates/>
-                	</p>
-                	<xsl:text>&#xa;</xsl:text>
-                </xsl:template>
-	
-	<xsl:template match="tei:head">
-		<h2>
-			<xsl:call-template name="addClass"/>
-			<xsl:apply-templates/>
-		</h2>
-	</xsl:template>
-                
-	<xsl:template match="//tei:lb">
-		<xsl:variable name="lbcount">
-			<xsl:choose>
-				<xsl:when test="ancestor::tei:ab"><xsl:number from="tei:ab" level="any"/></xsl:when>
-				<xsl:when test="ancestor::tei:p"><xsl:number from="tei:p" level="any"/></xsl:when>
-				<xsl:otherwise>999</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		<xsl:if test="@rend='hyphen(-)'"><span class="hyphen">-</span></xsl:if>
-		<xsl:if test="@rend='hyphen(=)'"><span class="hyphen">=</span></xsl:if>
-		<xsl:if test="not($lbcount=1) or preceding-sibling::node()[matches(.,'\S')]"><br/><xsl:text>&#xa;</xsl:text></xsl:if>
-		<xsl:if test="@n and not(@rend='prose')">
-			<xsl:choose>
-				<xsl:when test="matches(@n,'^[0-9]*[05]$')">
-					<!--<a title="{@n}" class="verseline" style="position:relative"> </a>-->
-					<span class="verseline"><span class="verselinenumber"><xsl:value-of select="@n"/></span></span>
-				</xsl:when>
-				<xsl:when test="matches(@n,'[^0-9]')">
-					<!--<a title="{@n}" class="verseline" style="position:relative"> </a>-->
-					<span class="verseline"><span class="verselinenumber"><xsl:value-of select="@n"/></span></span>
-				</xsl:when>
-				<xsl:otherwise>
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:if>
-	</xsl:template>
-	
-	<!-- Page breaks -->                
-	<xsl:template match="//*[local-name()=$editionpagetag][not(following-sibling::tei:cb)]">
-		<xsl:variable name="editionpagetype">
-			<xsl:choose>
-				<xsl:when test="ancestor::tei:ab">editionpageverse</xsl:when>
-				<xsl:otherwise>editionpage</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		<xsl:variable name="pagenumber">
-			<xsl:choose>
-				<xsl:when test="@n"><xsl:value-of select="@n"/></xsl:when>
-				<xsl:when test="@facs"><xsl:value-of select="substring-before(@facs,'.')"/></xsl:when>
-				<xsl:otherwise>[NN]</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		
-		<xsl:variable name="page_id"><xsl:value-of select="count(preceding::*[local-name()=$editionpagetag])"/></xsl:variable>
-		
-		<xsl:if test="//tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))][following::*[local-name()=$editionpagetag][1][count(preceding::*[local-name()=$editionpagetag]) = $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[not(@place='inline') and not(matches(@type,'intern|auto'))][following::*[local-name()=$editionpagetag][1][count(preceding::*[local-name()=$editionpagetag]) = $page_id]]">
-					<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note[not(@place='inline')]) + 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>                                
-		
-		<xsl:text>&#xa;</xsl:text>
-		<br/><xsl:text>&#xa;</xsl:text>
-		<a class="txm-page" title="{count(preceding::*[local-name()=$editionpagetag]) + 2}"/>
-		<span class="{$editionpagetype}"> - <xsl:value-of select="$pagenumber"/> - </span><br/><xsl:text>&#xa;</xsl:text>
-	</xsl:template>
-	
-	<!-- Notes -->
-	<xsl:template match="tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))]">
-		<!--<span style="color:violet"> [<b>Note :</b> <xsl:apply-templates/>] </span>-->	
-		<xsl:variable name="note_count"><xsl:value-of select="count(preceding::tei:note[not(@place='inline') and not(matches(@type,'intern|auto'))]) + 1"/></xsl:variable>
-		<xsl:variable name="note_content">
-			<xsl:choose>
-				<xsl:when test="descendant::txm:form">
-					<xsl:for-each select="descendant::txm:form">						
-						<xsl:value-of select="."/>
-						<xsl:if test="not(matches(following::txm:form[1],'^[.,\)]')) and not(matches(.,'^\S+[''’]$|^[‘\(]$'))">
-							<xsl:text> </xsl:text>
-						</xsl:if>
-					</xsl:for-each>
-				</xsl:when>
-				<xsl:otherwise><xsl:value-of select="normalize-space(.)"/></xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-		<a title="{$note_content}" style="font-size:75%;position:relative;top:-5px" href="#note_{$note_count}" name="noteref_{$note_count}">[<xsl:value-of select="$note_count"/>]</a>
-		<xsl:call-template name="spacing"/>                                
-	</xsl:template>
-	
-	<xsl:template match="tei:note[@place='inline']">
-		<span class="noteinline">
-			<xsl:apply-templates/>
-		</span>
-	</xsl:template>
-                
-                <xsl:template match="//tei:w"><span class="w">
-                                                <xsl:if test="@id">
-                                                	<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
-                                                </xsl:if>
-                                	<xsl:attribute name="title">
-                                		<xsl:if test="@id">
-                                			<xsl:value-of select="@id"></xsl:value-of>
-                                		</xsl:if>
-                                		<xsl:if test="ancestor::tei:corr">
-                                			<xsl:value-of select="concat(' sic : ',@sic)"/>
-                                		</xsl:if>
-                                		<xsl:if test="ancestor::tei:reg">
-                                			<xsl:value-of select="concat(' orig : ',@orig)"/>
-                                		</xsl:if>
-                                		<xsl:choose>
-                                			<xsl:when test="descendant::txm:ana">	
-                                					<xsl:for-each select="descendant::txm:ana">
-                                						<xsl:value-of select="concat(' ',substring-after(@type,'#'),' : ',.)"/>
-                                					</xsl:for-each>
-                                			</xsl:when>
-                                			<xsl:otherwise>
-                                				<xsl:for-each select="@*[not(local-name()='id')]">
-                                					<xsl:value-of select="concat(' ',name(.),' : ',.)"/>
-                                				</xsl:for-each>                                				
-                                			</xsl:otherwise>
-                                		</xsl:choose>
-                                		<xsl:if test="@*[matches(name(.),'pos$')]">
-                                		</xsl:if>                                		
-                                	</xsl:attribute>
-                	<xsl:choose>
-                		<xsl:when test="descendant::txm:form">
-                			<xsl:apply-templates select="txm:form"/>
-                		</xsl:when>
-                		<xsl:otherwise><xsl:apply-templates/></xsl:otherwise>
-                	</xsl:choose>
-                	
-                                </span><xsl:call-template name="spacing"/></xsl:template>
-                
-<!--                <xsl:template match="//txm:form">
-                                <xsl:apply-templates/>
-                </xsl:template>
--->                
-	<xsl:template name="spacing">
-		<xsl:choose>
-			<xsl:when test="$inputtype='xmltxm'">
-				<xsl:call-template name="spacing-xmltxm"/>
-			</xsl:when>
-			<xsl:otherwise>
-				<xsl:call-template name="spacing-xmlw"/>
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-	
-	<xsl:template name="spacing-xmlw">
-		<xsl:choose>
-			<xsl:when test="ancestor::tei:w"/>
-			<xsl:when test="following::tei:w[1][matches(.,'^\s*[.,)\]]+\s*$')]"/>			
-			<xsl:when test="matches(.,'^\s*[(\[‘]+$|\w(''|’)\s*$')"></xsl:when>
-			<xsl:when test="position()=last() and (ancestor::tei:choice or ancestor::tei:supplied[not(@rend='multi_s')])"></xsl:when>
-			<xsl:when test="following-sibling::*[1][self::tei:note]"></xsl:when>
-			<xsl:when test="following::tei:w[1][matches(.,'^\s*[:;!?]+\s*$')]">
-				<xsl:text>&#xa0;</xsl:text>
-			</xsl:when>
-			<xsl:otherwise>
-				<xsl:text> </xsl:text>
-			</xsl:otherwise>
-		</xsl:choose>                
-	</xsl:template>
-
-	<xsl:template name="spacing-xmltxm">
-		<xsl:choose>
-			<xsl:when test="ancestor::tei:w"/>
-			<xsl:when test="following::tei:w[1][matches(descendant::txm:form[1],'^[.,)\]]+$')]"/>			
-			<xsl:when test="matches(descendant::txm:form[1],'^[(\[‘]+$|\w(''|’)$')"></xsl:when>
-			<xsl:when test="position()=last() and (ancestor::tei:choice or ancestor::tei:supplied[not(@rend='multi_s')])"></xsl:when>
-			<xsl:when test="following-sibling::*[1][self::tei:note]"></xsl:when>
-			<xsl:when test="following::tei:w[1][matches(descendant::txm:form[1],'^[:;!?]+$')]">
-				<xsl:text>&#xa0;</xsl:text>
-			</xsl:when>
-			<xsl:otherwise>
-				<xsl:text> </xsl:text>
-			</xsl:otherwise>
-		</xsl:choose>                
-	</xsl:template>
-
-                
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/concordance_simple.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/concordance_simple.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/concordance_simple.xsl	(revision 729)
@@ -1,243 +0,0 @@
-﻿<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
-								xmlns:exsl="http://exslt.org/common">
-	<!-- Revised 8 Feb 2012 by TMR -->
-	
-	<!-- Delimiter is tab. written as &#09; -->
-
-	<xsl:output method="text" encoding="UTF-8" indent="no" />
-
-	<xsl:param name="cx" select="15"/>
-	<!-- vary this value to change the size of the context -->
-	
-	<xsl:param name="ntTypes"></xsl:param>
-	<!-- non-terminal pivot features to show -->
-		
-	<xsl:param name="tTypes" >pos form</xsl:param>
-	<!-- terminal pivot features to show -->
-				
-	<xsl:key name="idkey" match="t|nt" use="@id"/>
-	<!-- Lezius' lookup key -->
-
-	<xsl:template match="/">
-		
-		<xsl:variable name="valueshownt" ><xsl:value-of select="$ntTypes" /></xsl:variable>
-		
-		<xsl:variable name="valueshowt" ><xsl:value-of select="$tTypes" /></xsl:variable>
-		
-		<!--Write a header-->
-				
-		<xsl:text>ID&#x09;LeftCxOutsideSnt&#x09;LeftCxInsideSnt&#x09;Pivot&#x09;</xsl:text>
-		
-		<xsl:for-each select="tokenize($valueshownt/node(), '\s+')">
-			
-			<xsl:value-of select="." /><xsl:text>&#x09;</xsl:text>
-			
-		</xsl:for-each>
-		
-		<xsl:for-each select="tokenize($valueshowt/node(), '\s+')">
-			
-			<xsl:value-of select="." /><xsl:text>&#x09;</xsl:text>
-			
-		</xsl:for-each>
-		
-		<xsl:text>RightCxInsideSnt&#x09;RightCxOutsideSnt&#x0D;&#x0A;</xsl:text>
-	
-		<xsl:for-each select="descendant::variable[@name='#pivot']">
-			
-			<!-- Each #pivot node in the document is selected -->
-
-			<xsl:variable name="inpivot">
-
-				<pivot>
-					<xsl:apply-templates select="key('idkey', @idref)" mode="get-terminals" />
-				</pivot>
-
-			</xsl:variable>
-
-			<xsl:variable name="inpivot-sort">
-				<pivot>
-					<xsl:for-each select="exsl:node-set($inpivot)//t">
-						<xsl:sort select="@id" />
-						<xsl:copy-of select="." />
-					</xsl:for-each>
-				</pivot>
-			</xsl:variable>
-
-			<xsl:variable name="firstpivotid">
-
-				<xsl:apply-templates select="exsl:node-set($inpivot-sort)//t[1]" mode="id" />
-					
-			</xsl:variable>
-
-			<xsl:variable name="lastpivotid">
-
-				<xsl:apply-templates select="exsl:node-set($inpivot-sort)//t[last()]" mode="id" />
-
-			</xsl:variable>
-
-			<!-- sentence ID -->
-
-			<xsl:apply-templates select="ancestor::s" mode="id" />			
-			<xsl:text>&#x09;</xsl:text>
-
-			<!-- left context -->
-
-			<xsl:apply-templates select="key('idkey', $firstpivotid)" mode="left-cx" /><xsl:text>&#x09;</xsl:text>
-
-			<!-- pivot text -->
-
-			<xsl:apply-templates select="ancestor::s" mode="pivot">
-				<xsl:with-param name="inpivot" select="exsl:node-set($inpivot-sort)" />
-			</xsl:apply-templates><xsl:text>&#x09;</xsl:text>
-			
-			<!-- pivot properties -->
-			
-			<xsl:variable name="thispivot" select="key('idkey', @idref)" />
-			
-			<xsl:for-each select="tokenize($valueshownt/node(), '\s+')">
-				
-				<xsl:variable name="attr" select="."/>
-				
-				<xsl:value-of select="$thispivot/@*[name()=$attr]"/><xsl:text>&#x09;</xsl:text>
-				
-			</xsl:for-each>
-			<xsl:for-each select="tokenize($valueshowt/node(), '\s+')">
-				
-				<xsl:variable name="attr" select="."/>
-				
-				<xsl:value-of select="$thispivot/@*[name()=$attr]"/><xsl:text>&#x09;</xsl:text>
-				
-			</xsl:for-each>
-				
-			<!-- right context -->
-			<xsl:apply-templates select="key('idkey', $lastpivotid)" mode="right-cx" /><xsl:text>&#x0D;&#x0A;</xsl:text>
-
-		</xsl:for-each>
-
-	</xsl:template>
-
-	<xsl:template match="t" mode="get-terminals">
-
-		<xsl:copy-of select="." />
-
-	</xsl:template>
-
-	<xsl:template match="t" mode="left-cx">
-		
-		<xsl:variable name="pivot-node" select="." />
-		<xsl:variable name="this-sid"><xsl:value-of select="ancestor::s/@id" /></xsl:variable>
-		
-		<xsl:for-each select="preceding::t[position() &lt; number($cx)]" >
-			<!-- xsl:sort select="@id" / -->
-			<xsl:choose>
-				<!-- switch from out-of-sentence to in-sentence context -->
-				<xsl:when test="ancestor::s[@id = $this-sid] and not(preceding-sibling::t)">
-					<xsl:text>&#x09;</xsl:text>
-				</xsl:when>
-				
-				<!-- first word of the context and in the same sentence -->
-				
-				<xsl:when test="position() = 1 and ancestor::s[@id=$this-sid]"><xsl:text>&#x09;</xsl:text></xsl:when>
-				
-				<!-- first word of the context -->
-				
-				<xsl:when test="position() = 1" />
-				
-				<!-- first word in a sentence -->
-				<xsl:when test="not(preceding-sibling::t)"><xsl:text> / </xsl:text></xsl:when>
-				
-				<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
-				
-			</xsl:choose>
-			
-			<xsl:apply-templates select="." mode="output" />
-			
-			<!-- add blank column if there's no in-sentence context -->
-			<xsl:if test="position() = last() and ancestor::s[@id != $this-sid]"><xsl:text>&#x09;</xsl:text></xsl:if>
-			
-		</xsl:for-each>
-		
-	</xsl:template>
-	
-	<xsl:template match="t" mode="right-cx">
-		
-		<xsl:variable name="pivot-node" select="." />
-		<xsl:variable name="this-sid"><xsl:value-of select="ancestor::s/@id" /></xsl:variable>
-		
-		<xsl:for-each select="following::t[position() &lt; number($cx)]" >
-			<!-- xsl:sort select="@id" / -->
-			<xsl:choose>
-				<!-- switch from in-sentence to out-of-sentence context -->
-				<xsl:when test="ancestor::s[@id != $this-sid] and preceding::t[position()=1]/ancestor::s[@id = $this-sid]">
-					<xsl:text>&#x09;</xsl:text>
-				</xsl:when>
-				
-				<!-- first word of the context -->
-				
-				<xsl:when test="position() = 1" />
-				
-				<!-- first word in a sentence -->
-				<xsl:when test="not(preceding-sibling::t)"><xsl:text> / </xsl:text></xsl:when>
-				
-				<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
-				
-			</xsl:choose>
-			<xsl:apply-templates select="." mode="output" />
-			<!-- add blank column if there's no out-of-sentence context -->
-			<xsl:if test="position() = last() and ancestor::s[@id = $this-sid]"><xsl:text>&#x09;</xsl:text></xsl:if>
-			
-		</xsl:for-each>
-		
-	</xsl:template>
-
-	<xsl:template match="s" mode="pivot">
-		<xsl:param name="inpivot" />
-
-			<xsl:variable name="firstpivotid">
-
-				<xsl:apply-templates select="$inpivot//t[1]" mode="id" />
-					
-			</xsl:variable>
-
-			<xsl:variable name="lastpivotid">
-				<xsl:apply-templates select="$inpivot//t[last()]" mode="id" />
-
-			</xsl:variable>
-
-		<xsl:for-each select="descendant::t" >
-			<xsl:variable name="thisid" select = "@id" />
-			<xsl:choose>
-				<xsl:when test="following-sibling::t[@id=$firstpivotid]" />
-				<xsl:when test="preceding-sibling::t[@id=$lastpivotid]" />
-				<xsl:when test="$inpivot//t[@id=$thisid]"><xsl:apply-templates select="." mode="output" /><xsl:text> </xsl:text></xsl:when>
-				<xsl:otherwise>[<xsl:apply-templates select="." mode="output" />]<xsl:text> </xsl:text></xsl:otherwise>
-			</xsl:choose>			
-		</xsl:for-each>
-
-	</xsl:template>
-
-	<xsl:template match="t" mode="output">
-		
-		<xsl:value-of select="@word" />
-
-	</xsl:template>
-
-	<xsl:template match="nt|t|s" mode="id">
-		
-		<xsl:value-of select="@id" />
-
-	</xsl:template>
-
-	<xsl:template match="nt" mode="get-terminals">
-
-		<xsl:for-each select="edge">
-
-			<xsl:apply-templates select="key('idkey', @idref)" mode="get-terminals" />
-	
-		</xsl:for-each>
-
-	</xsl:template>
-
-</xsl:stylesheet>
-
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teifrantext-teibfm.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teifrantext-teibfm.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teifrantext-teibfm.xsl	(revision 729)
@@ -1,363 +0,0 @@
-<?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 TEI P5 à l'importation 
-      dans TXM. Permet de simplifier la structure du document afin
-      d'optimiser les index CWB
-    </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>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-  
-  <!--
-    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
-  -->
-  
-  <!-- Modification par AL le 2013-12-31 
-      harmonisation avec la feuille de style txm-filter-teip5-teibfm.xsl
-  -->
-  
-  <!-- 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:g
-    |tei:space|tei:titlePage ">
-    <xsl:call-template name="deleteAll"/>
-  </xsl:template>
-  
-  <!-- balises à supprimer, contenu à conserver -->  
-  <xsl:template match="tei:add|tei:app
-    |tei:caesura|tei:castItem|tei:castGroup[ancestor::tei:castList]
-    |tei:castList[ancestor::tei:p]|tei:cell|tei:choice|tei:cit|tei:corr|tei:date|tei:ex
-    |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:reg|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:subst|tei:term|tei:unclear">
-    <xsl:call-template name="deleteTag"/>
-  </xsl:template>
-  
-  <!-- balises à transformer en notes-->
-  <xsl:template match="tei:abbr[parent::tei:choice and not(ancestor::tei:note)]
-    |tei:bibl[not(ancestor::tei:note)]
-    |tei:del
-    |tei:orig[parent::tei:choice and not(ancestor::tei:note)]    
-    |tei:rdg[parent::tei:app and not(ancestor::tei:note)]
-    |tei:sic[parent::tei:choice and not(ancestor::tei:note)]
-    |tei:surplus[not(ancestor::tei:w)]">
-    <xsl:call-template name="makeNote"/>
-  </xsl:template>
-  
-  <!-- balises de noms à indexer -->
-  
-  <xsl:template match="tei:name
-    |tei:geogName
-    |tei:persName
-    |tei:placeName
-    |tei:roleName
-    |tei:orgName">
-    <xsl:call-template name="makeName"/>
-  </xsl:template>
-  
-  <!-- à transformer en W -->
-  
-  <xsl:template match="tei:abbr[not(parent::tei:choice)]
-    |tei:expan
-    |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 -->
-
-<!--  <xsl:template match="/">
-      <xsl:apply-templates/>  
-  </xsl:template>
--->
-  
-  <xsl:template match="*">    
-    <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()">
-    <xsl:copy/>
-  </xsl:template>
-
-  <xsl:template match="text()">
-    <xsl:analyze-string select="." regex="&amp;|&lt;|&gt;|--|\*(\w+)">
-      <xsl:matching-substring>
-        <xsl:choose>
-          <xsl:when test="matches(.,'&amp;')">
-            <expan xmlns="http://www.tei-c.org/ns/1.0">et</expan>
-          </xsl:when>
-          <xsl:when test="matches(.,'&lt;')">
-            <xsl:text>[</xsl:text>
-          </xsl:when>
-          <xsl:when test="matches(.,'&gt;')">
-            <xsl:text>]</xsl:text>
-          </xsl:when>
-          <!-- pose problème si se trouve dans les notes transformés en commentaires xml par le tokeniseur -->
-          <xsl:when test="matches(.,'--')">
-            <xsl:text> - </xsl:text>
-          </xsl:when>
-          <!-- Spécial FRANTEXT -->
-          <xsl:when test="matches(.,'\*(\w+)')">
-            <name xmlns="http://www.tei-c.org/ns/1.0" type="maj"><xsl:value-of select="regex-group(1)"/></name>        		
-          </xsl:when>          
-          <xsl:otherwise>
-            <xsl:value-of select="."/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </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 ne touche pas au 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:apply-templates select="text()"/>
-    </note>
-  </xsl:template>
-  
-<!-- On supprime toutes les balises à l'intérieur des notes-->
-  <xsl:template match="tei:note">
-    <xsl:copy>
-      <xsl:apply-templates select="text()"/>
-    </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>
-    <xsl:choose>
-      <xsl:when test="descendant::tei:w or ancestor::tei:w">
-<!--            <xsl:element namespace="http://www.tei-c.org/ns/1.0" name="seg">
-              <xsl:attribute name="type"><xsl:value-of select="local-name(.)"/></xsl:attribute>
-              <xsl:apply-templates select="*|@*[not(name()='type')]|processing-instruction()|comment()|text()"/>
-            </xsl:element>
--->
-        <xsl:apply-templates/> <!-- on supprime ces balises pour éviter la réduplication des mots-->
-      </xsl:when>
-      <xsl:otherwise>
-        <w type="{$wordType}" xmlns="http://www.tei-c.org/ns/1.0"><xsl:apply-templates/></w>
-      </xsl:otherwise>
-    </xsl:choose>    
-  </xsl:template>  
-
-<xsl:template name="makeName">
-  <xsl:variable name="nameType">
-    <xsl:choose>
-      <xsl:when test="@type">
-        <xsl:choose>
-          <xsl:when test="local-name()='name'"><xsl:value-of select='@type'/></xsl:when>
-          <xsl:otherwise><xsl:value-of select="concat(local-name(),'-',@type)"/></xsl:otherwise>
-        </xsl:choose>
-      </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>
-
-<!-- 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[not(contains(@rend,'multi_s'))][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>
-              <xsl:element name="foreign" namespace="http://www.tei-c.org/ns/1.0">
-                <xsl:attribute name="lang"><xsl:value-of select="$lang"/></xsl:attribute>
-                <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>
-              </xsl:element>
-              <xsl:value-of select="regex-group(2)"/>
-              <xsl:text> </xsl:text>
-            </xsl:matching-substring>
-            <xsl:non-matching-substring>
-              <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:non-matching-substring>
-          </xsl:analyze-string>          
-        </xsl:when>
-        <xsl:when test="self::*[not(descendant::text())]">
-          <xsl:apply-templates/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:element name="foreign" namespace="http://www.tei-c.org/ns/1.0">
-            <xsl:attribute name="lang"><xsl:value-of select="$lang"/></xsl:attribute>
-            <xsl:apply-templates select="."/>          
-          </xsl:element>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:for-each>
-  </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:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/concordance_mot-pivot.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/concordance_mot-pivot.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/concordance_mot-pivot.xsl	(revision 729)
@@ -1,301 +0,0 @@
-﻿<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
-				xmlns:exsl="http://exslt.org/common">
-
-	<xsl:output method="text" encoding="UTF-8" indent="no" />
-
-	<xsl:strip-space elements="*" />
-
-	<xsl:param name="cx" select="30"/>
-	<!-- vary this value to change the size of the context -->
-	
-	<xsl:param name="ntTypes">cat</xsl:param>
-	<!-- non-terminal pivot features to show -->
-	
-	<xsl:param name="tTypes" >pos</xsl:param>
-	<!-- terminal pivot features to show -->
-	
-	<xsl:variable name="valueshownt" ><xsl:value-of select="$ntTypes" /></xsl:variable>
-	
-	<xsl:variable name="valueshowt" ><xsl:value-of select="$tTypes" /></xsl:variable>
-
-	<xsl:key name="idkey" match="t|nt" use="@id"/>
-	<!-- Lezius' lookup key -->
-
-	<xsl:key name="idkey-reverse" match="edge" use="@idref"/>
-	<!-- reverse lookup key -->
-
-	<xsl:template match="/">
-		
-		<!--Write a header-->
-		
-		<xsl:text>ID&#x09;LeftCxOutsideSnt&#x09;LeftCxInsideSnt&#x09;Pivot&#x09;</xsl:text>
-		
-		<xsl:for-each select="tokenize($valueshowt/node(), '\s+')">
-			
-			<xsl:value-of select="." /><xsl:text>&#x09;</xsl:text>
-			
-		</xsl:for-each>
-		
-		<xsl:text>PivotStr&#x09;</xsl:text>
-		
-		<xsl:for-each select="tokenize($valueshownt/node(), '\s+')">
-			
-			<xsl:value-of select="." /><xsl:text>&#x09;</xsl:text>
-			
-		</xsl:for-each>
-	
-		<xsl:text>RightCxInsideSnt&#x09;RightCxOutsideSnt&#x0D;&#x0A;</xsl:text>
-
-		<xsl:for-each select=".//match">
-
-			<!-- only treat match nodes -->
-
-			<!-- first column: print sentence ID -->
-
-			<xsl:value-of select="ancestor::s/@id" />
-
-			<!-- next, verify that pivot is a terminal node -->
-
-			<xsl:variable name="pivot-var" select="./variable[@name='#pivot']" />
-
-			<xsl:variable name="pivot-node" select="key('idkey', exsl:node-set($pivot-var)/@idref)" />
-
-			<xsl:choose>
-
-				<xsl:when test="exsl:node-set($pivot-node)[self::t]">
-
-					<xsl:apply-templates select="exsl:node-set($pivot-node)" mode="write-table" />
-
-				</xsl:when>
-
-				<xsl:otherwise><xsl:text>&#x09;Query error: #pivot is not a terminal node</xsl:text></xsl:otherwise>
-
-			</xsl:choose>
-
-			<xsl:text>&#x0d;&#x0a;</xsl:text>
-
-		</xsl:for-each>
-
-	</xsl:template>
-
-	<xsl:template match="t" mode="write-table">
-		
-		<!-- Context node is a t-node pivot -->
-
-		<!-- First stage: produce left context -->
-
-		<xsl:text>&#x09;</xsl:text><xsl:apply-templates select="." mode="left-cx" />
-
-		<!-- Next stage, write the word in the pivot -->
-
-		<xsl:text>&#x09;</xsl:text><xsl:apply-templates select="." mode="output" />
-
-		<!-- Next stage, write other required terminal attributes -->
-		
-		<xsl:variable name="thispivot" select="." />
-		
-		<xsl:text>&#x09;</xsl:text>
-		<xsl:for-each select="tokenize($valueshowt/node(), '\s+')">
-			
-			<xsl:variable name="attr" select="."/>
-			
-			<xsl:value-of select="$thispivot/@*[name()=$attr]"/><xsl:text>&#x09;</xsl:text>
-			
-		</xsl:for-each>
-		
-		<!-- Next stage, write the lexical string contained in the parent NT node -->
-
-		<xsl:apply-templates select="key('idkey-reverse', @id)/ancestor::nt" mode="output" />
-
-		<!-- Next stage, write the required <nt /> properties -->
-		
-		<xsl:variable name="pivotnt" select="key('idkey-reverse', @id)/.." />
-		
-		<xsl:text>&#x09;</xsl:text>
-		<xsl:for-each select="tokenize($valueshownt/node(), '\s+')">
-			
-			<xsl:variable name="attr" select="."/>
-			
-			<xsl:value-of select="$pivotnt/@*[name()=$attr]"/><xsl:text>&#x09;</xsl:text>
-			
-		</xsl:for-each>
-
-		<!-- Next stage, write the right-cx -->
-
-		<xsl:apply-templates select="." mode="right-cx"/>
-
-	</xsl:template>
-
-	<xsl:template match="t" mode="left-cx">
-
-		<xsl:variable name="pivot-node" select="." />
-		<xsl:variable name="this-sid"><xsl:value-of select="ancestor::s/@id" /></xsl:variable>
-
-		<xsl:for-each select="preceding::t[position() &lt; number($cx)]" >
-			<!-- xsl:sort select="@id" / -->
-			<xsl:choose>
-				<!-- switch from out-of-sentence to in-sentence context -->
-				<xsl:when test="ancestor::s[@id = $this-sid] and not(preceding-sibling::t)">
-					<xsl:text>&#x09;</xsl:text>
-				</xsl:when>
-
-				<!-- first word of the context and in the same sentence -->
-
-				<xsl:when test="position() = 1 and ancestor::s[@id=$this-sid]"><xsl:text>&#x09;</xsl:text></xsl:when>
-
-				<!-- first word of the context -->
-
-				<xsl:when test="position() = 1" />
-
-				<!-- first word in a sentence -->
-				<xsl:when test="not(preceding-sibling::t)"><xsl:text> / </xsl:text></xsl:when>
-
-				<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
-
-			</xsl:choose>
-
-			<xsl:apply-templates select="." mode="output" />
-	
-			<!-- add blank column if there's no in-sentence context -->
-			<xsl:if test="position() = last() and ancestor::s[@id != $this-sid]"><xsl:text>&#x09;</xsl:text></xsl:if>
-
-		</xsl:for-each>
-
-	</xsl:template>
-
-	<xsl:template match="t" mode="right-cx">
-
-		<xsl:variable name="pivot-node" select="." />
-		<xsl:variable name="this-sid"><xsl:value-of select="ancestor::s/@id" /></xsl:variable>
-
-		<xsl:for-each select="following::t[position() &lt; number($cx)]" >
-			<!-- xsl:sort select="@id" / -->
-			<xsl:choose>
-				<!-- switch from in-sentence to out-of-sentence context -->
-				<xsl:when test="ancestor::s[@id != $this-sid] and preceding::t[position()=1]/ancestor::s[@id = $this-sid]">
-					<xsl:text>&#x09;</xsl:text>
-				</xsl:when>
-
-				<!-- first word of the context -->
-
-				<xsl:when test="position() = 1" />
-
-				<!-- first word in a sentence -->
-				<xsl:when test="not(preceding-sibling::t)"><xsl:text> / </xsl:text></xsl:when>
-
-				<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
-
-			</xsl:choose>
-			<xsl:apply-templates select="." mode="output" />
-			<!-- add blank column if there's no out-of-sentence context -->
-			<xsl:if test="position() = last() and ancestor::s[@id = $this-sid]"><xsl:text>&#x09;</xsl:text></xsl:if>
-
-		</xsl:for-each>
-
-	</xsl:template>
-
-	<xsl:template match="nt|t|s" mode="id">
-		
-		<xsl:value-of select="@id" />
-
-	</xsl:template>
-
-	<xsl:template match="variable" mode="name">
-		
-		<xsl:value-of select="@name" />
-
-	</xsl:template>
-
-	<xsl:template match="t" mode="output">
-		
-		<xsl:value-of select="@word" />
-
-	</xsl:template>
-
-
-
-	<xsl:template match="nt" mode="output">
-
-		<!-- prints lexical content of nt node in correct order with constituents not in the pivot bracketed -->
-
-		<!-- stuff a copy of all the tnodes in the pivot in $in-pivot -->
-		<xsl:variable name='in-pivot'>
-			<xsl:apply-templates select="." mode="get-terminals" />
-		</xsl:variable>
-
-		<!-- create a copy of terminals, with an attribute "in-pivot='True'" -->
-
-		<xsl:variable name="new-terminals">
-
-			<xsl:for-each select="ancestor::s//t">
-
-				<xsl:variable name="current-id"><xsl:value-of select="@id" /></xsl:variable>
-
-				<!-- copy element into variable -->
-
-				<xsl:copy>
-
-					<xsl:if test="exsl:node-set($in-pivot)//t[@id = $current-id]">
-						<xsl:attribute name="in-pivot">True</xsl:attribute>
-					</xsl:if>
-					<xsl:apply-templates select="@*" mode="copy"/>
-
-				</xsl:copy>
-
-			</xsl:for-each>
-
-		</xsl:variable>
-
-		<!-- $new-terminals is in the correct order, so we can calculate the limits of the segment -->
-
-		<xsl:variable name="first-pivot-id"><xsl:value-of select="exsl:node-set($new-terminals)//t[@in-pivot][position()=1]/@id" /></xsl:variable>
-
-		<xsl:variable name="last-pivot-id"><xsl:value-of select="exsl:node-set($new-terminals)//t[@in-pivot][position()=last()]/@id" /></xsl:variable>
-
-		<!-- At last! At last! We can output the MF! -->
-
-		<xsl:for-each select="exsl:node-set($new-terminals)//t">
-
-			<xsl:if test="@id = $first-pivot-id or @id = $last-pivot-id or (preceding-sibling::t[@id = $first-pivot-id] and following-sibling::t[@id = $last-pivot-id])">
-
-				<!-- print the word -->
-				
-				<xsl:if test="not(@id = $first-pivot-id)"><xsl:text> </xsl:text></xsl:if>
-
-				<xsl:choose>
-
-					<xsl:when test="@in-pivot"><xsl:apply-templates select="." mode="output" /></xsl:when>
-
-					<xsl:otherwise><xsl:text>[</xsl:text><xsl:apply-templates select="." mode="output" /><xsl:text>]</xsl:text></xsl:otherwise>
-
-				</xsl:choose>
-
-			</xsl:if>
-
-		</xsl:for-each>
-
-	</xsl:template>
-
-	<xsl:template match="@*" mode="copy">
-		<!-- returns a copy of all attribute nodes -->
-		<xsl:copy />
-	</xsl:template>	
-
-	<xsl:template match="t" mode="get-terminals">
-
-		<xsl:copy-of select="." />
-
-	</xsl:template>
-
-	<xsl:template match="nt" mode="get-terminals">
-
-		<xsl:for-each select="edge">
-
-			<xsl:apply-templates select="key('idkey', @idref)" mode="get-terminals" />
-	
-		</xsl:for-each>
-
-	</xsl:template>
-
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teip5-xmlw-preserve.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teip5-xmlw-preserve.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teip5-xmlw-preserve.xsl	(revision 729)
@@ -1,113 +0,0 @@
-<?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 TEI à l'importation
-      TXM dans un format xml simple. 
-    </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>
-  
-
-  <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|facsimile</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>
-
-	<!-- On supprime le teiHeader  pour l'import xml-w -->
-	
-	<xsl:template match="tei:teiHeader">    
-		<!--<xsl:copy-of select="."/>-->    
-	</xsl:template>
-	
-	<xsl:template match="tei:facsimile">    
-		<!--<xsl:copy-of select="."/>-->    
-	</xsl:template>
-	
-
-	<!-- ancien filtre pour les noeuds texte, n'est plus nécessaire pour l'import xml/w TXM 0.5 -->
-
-  <!--<xsl:template match="text()">
-  	<xsl:analyze-string select="." regex="&amp;lt;|&amp;gt;|&lt;|&gt;|-\-">
-      <xsl:matching-substring>
-        <xsl:choose>
-        	<xsl:when test="matches(.,'&amp;lt;')">
-        		<xsl:text>‹</xsl:text>
-        	</xsl:when>
-        	<xsl:when test="matches(.,'&amp;gt;')">
-        		<xsl:text>›</xsl:text>
-        	</xsl:when>
-          <xsl:when test="matches(.,'&lt;')">
-            <xsl:text>‹</xsl:text>
-          </xsl:when>
-          <xsl:when test="matches(.,'&gt;')">
-            <xsl:text>›</xsl:text>
-          </xsl:when>
-          <!-\- pose problème si se trouve dans les notes transformés en commentaires xml par le tokeniseur -\->
-          <xsl:when test="matches(.,'-\-')">
-            <xsl:text> - </xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="."/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:matching-substring>
-      <xsl:non-matching-substring>         
-            <xsl:value-of select="."/>
-      </xsl:non-matching-substring>      
-    </xsl:analyze-string>
-  </xsl:template>-->
-
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teip5-xmlw-simplify.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teip5-xmlw-simplify.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teip5-xmlw-simplify.xsl	(revision 729)
@@ -1,231 +0,0 @@
-<?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 TEI P5 à l'importation 
-      dans TXM en utilisant le module d'import xml-w. Permet de supprimer
-      le contenu de teiHeader et des élements hors-texte et de supprimer
-      les balises non utilisées dans les index TXM.
-      Par défaut, toutes les balises sauf celles qui sont listées dans le
-      paramètre "copyAll" sont supprimées
-    </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>
-  
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-  
-  <!-- Listes des balises par type de traitement. -->
-  
-	<!-- balises à supprimer avec leur contenu -->
-  
-	<xsl:param name="deleteAll">teiHeader|facsimile|note</xsl:param>
-	
-	<xsl:template match="*[matches(name(),concat('^',$deleteAll,'$'))]">
-		<xsl:call-template name="deleteAll"/>
-	</xsl:template>
-		
-	<!-- balises à conserver  -->
-	<xsl:param name="copyAll">ab|body|div|front|head|lb|p|pb|s|TEI|text|w</xsl:param>
-	
-	<xsl:template match="*[matches(name(),concat('^',$copyAll,'$'))]">
-		<xsl:call-template name="copyAll"></xsl:call-template>
-	</xsl:template>
-	
-	<!-- balises à supprimer, contenu à conserver, c'est la règle par défaut -->  
-	<xsl:template match="*">
-		<xsl:call-template name="deleteTag"/>
-	</xsl:template>
-  
-  <!-- balises à transformer en notes-->
-  <!--<xsl:template match="">
-    <xsl:call-template name="makeNote"/>
-  </xsl:template>-->
-  
-
-  <!-- balises à transformer en W -->
-  
-<!--  <xsl:template match="tei:abbr[not(parent::tei:choice)]
-    |tei:expan
-    |tei:num[matches(.,'.')]">
-    <xsl:call-template name="makeWord"/>
-  </xsl:template>-->
-  
-  <!-- à transformer en AB typé -->
-  
-<!--  <xsl:template match="">
-    <xsl:call-template name="makeAb"/>
-  </xsl:template>
--->  
-  <!-- à transformer en DIV typé -->
-  
-<!--  <xsl:template match="">
-    <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 -->
-
-  <xsl:template match="@*|comment()">
-    <xsl:copy/>
-  </xsl:template>
-
-<xsl:template match="processing-instruction()"/>
-
-<xsl:template match="text()"><xsl:value-of select="."/></xsl:template>
-
-	<!-- ancien filtre pour les noeuds texte, n'est plus nécessaire pour l'import xml/w TXM 0.5 -->
-	
-	<!--<xsl:template match="text()">
-  	<xsl:analyze-string select="." regex="&amp;lt;|&amp;gt;|&lt;|&gt;|-\-">
-      <xsl:matching-substring>
-        <xsl:choose>
-        	<xsl:when test="matches(.,'&amp;lt;')">
-        		<xsl:text>‹</xsl:text>
-        	</xsl:when>
-        	<xsl:when test="matches(.,'&amp;gt;')">
-        		<xsl:text>›</xsl:text>
-        	</xsl:when>
-          <xsl:when test="matches(.,'&lt;')">
-            <xsl:text>‹</xsl:text>
-          </xsl:when>
-          <xsl:when test="matches(.,'&gt;')">
-            <xsl:text>›</xsl:text>
-          </xsl:when>
-          <!-\- pose problème si se trouve dans les notes transformés en commentaires xml par le tokeniseur -\->
-          <xsl:when test="matches(.,'-\-')">
-            <xsl:text> - </xsl:text>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="."/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:matching-substring>
-      <xsl:non-matching-substring>         
-            <xsl:value-of select="."/>
-      </xsl:non-matching-substring>      
-    </xsl:analyze-string>
-  </xsl:template>-->
-	
-
-<!-- On garde les balises utiles pour l'exploitation TXM -->
-  
-  <xsl:template name="copyAll">    
-  	<xsl:copy>
-  		<xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>	
-  	</xsl:copy>
-  </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:choose>
-          <xsl:when test="local-name()='name'"><xsl:value-of select='@type'/></xsl:when>
-          <xsl:otherwise><xsl:value-of select="concat(local-name(),'-',@type)"/></xsl:otherwise>
-        </xsl:choose>
-      </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>
--->
-<!-- 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>
-  
-
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/breakByMilestone.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/breakByMilestone.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/breakByMilestone.xsl	(revision 729)
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:me="http://www.menota.org/ns/1.0" xmlns:bfm="http://bfm.ens-lsh.fr/ns/1.0">
-
-    <!-- Based on a stylesheet for creating separate XML-TEI files for
-        each page by Paul Caton (posted on TEI-L 2008-12-11)-->
-
-    <xsl:output method="xml" encoding="UTF-8"/>
-
-    <xsl:param name="pbval1">7</xsl:param>
-    <xsl:param name="pbval2">8</xsl:param>
-
-    <xsl:function name="tei:page-content" as="node()*">
-        <xsl:param name="pb1" as="node()"/>
-        <xsl:param name="pb2" as="node()"/>
-        <xsl:param name="node" as="node()"/>
-        <xsl:choose>
-            <xsl:when test="$node[self::*]">
-                <!-- $node is an element() -->
-                <xsl:choose>
-                    <!--                    <xsl:when test="$node is $pb1">
-                        <xsl:copy-of select="$node"/>
-                    </xsl:when>
--->
-                    <xsl:when
-                        test="some $n in $node/descendant::* satisfies ($n is $pb1 or $n is $pb2)">
-                        <xsl:element name="{name($node)}" namespace="http://www.tei-c.org/ns/1.0">
-                            <!--<xsl:attribute name="testttt">http://www.menota.org/ns/1.0</xsl:attribute>-->
-                            <xsl:sequence select="for $i in ( $node/node() | $node/@* ) return tei:page-content($pb1, $pb2, $i)"/>
-                        </xsl:element>
-                    </xsl:when>
-                    <xsl:when test="($node >> $pb1) and ($node &lt;&lt; $pb2)">
-                        <xsl:copy-of select="$node"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <!-- do nothing -->
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:when>
-            <xsl:when test="$node[count(. | ../@*) = count(../@*)]">
-                <!-- $node is an attribute -->
-                <xsl:attribute name="{name($node)}">
-                    <xsl:sequence select="data($node)"/>
-                </xsl:attribute>
-            </xsl:when>
-            <xsl:otherwise>
-                <xsl:choose>
-                    <xsl:when test="($node >> $pb1) and ($node &lt;&lt; $pb2)">
-                        <xsl:copy-of select="$node"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <!-- do nothing -->
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:otherwise>
-        </xsl:choose>
-    </xsl:function>
-
-    <xsl:template match="*|text()|@*">
-        <xsl:copy>
-            <xsl:apply-templates select="@*"/>
-            <xsl:apply-templates/>
-        </xsl:copy>
-    </xsl:template>
-
-    <xsl:template match="processing-instruction()">
-        <xsl:copy>
-            <xsl:value-of select="."/>
-        </xsl:copy>
-    </xsl:template>
-
-    <xsl:template match="body">
-        <!-- <xsl:variable name="containingNode" select="//text"/> -->
-        <xsl:sequence select="tei:page-content(//pb[@id=$pbval1], //pb[@id=$pbval2], //body)"/>
-    </xsl:template>
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teibvh-xmlw-posttok.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teibvh-xmlw-posttok.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teibvh-xmlw-posttok.xsl	(revision 729)
@@ -1,369 +0,0 @@
-<?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:txm="http://textometrie.org/1.0"
-  exclude-result-prefixes="tei edate txm" xpath-default-namespace="http://www.tei-c.org/ns/1.0" version="2.0">
-
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/> 
-  
-  
-<!-- Partie générale : on copie les éléments, les attributs, le texte, les commentaires, on supprime mes prrocessing intstructions -->
-  
-  <xsl:template match="*">      
-        <xsl:copy>
-          <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-        </xsl:copy>    
-  </xsl:template>
-  
-  <xsl:template match="*" mode="position"><xsl:value-of select="count(preceding-sibling::*)"/></xsl:template>
-
-
-  <xsl:template match="@*|comment()|processing-instruction()">
-    <xsl:copy/>
-  </xsl:template>
-
-  <xsl:template match="text()">
-    <xsl:value-of select="."/>
-  </xsl:template>
-
-  <xsl:template match="teiHeader"/>
-  
-  <xsl:template match="text">
-    <xsl:copy>
-      <xsl:apply-templates select="@*"/>
-      <xsl:if test="not(child::*[1][self::pb])"><pb xmlns="http://www.tei-c.org/ns/1.0" n="title"/></xsl:if>
-      <xsl:apply-templates/>
-    </xsl:copy>
-  </xsl:template>
-
-  <xsl:template match="choice[not(@txm:wordPart)]">
-    <xsl:choose>
-      <xsl:when test="child::corr">
-        <corr xmlns="http://www.tei-c.org/ns/1.0">
-          <xsl:attribute name="sic"><xsl:value-of select="normalize-space(child::sic)"/></xsl:attribute>
-          <xsl:apply-templates select="child::corr/w"/>
-        	<xsl:if test="child::sic//lb and not(child::corr//lb)"><xsl:copy-of select="child::sic//lb"/></xsl:if>
-        </corr>
-      </xsl:when>
-      <xsl:when test="child::reg">
-        <reg xmlns="http://www.tei-c.org/ns/1.0">
-          <xsl:attribute name="orig"><xsl:value-of select="normalize-space(child::orig)"/></xsl:attribute>
-          <xsl:apply-templates select="child::reg/w"/>
-        	<xsl:if test="child::orig//lb  and not(child::reg//lb)"><xsl:copy-of select="child::orig//lb"/></xsl:if>
-        </reg>
-      </xsl:when>
-      <xsl:when test="child::expan">
-        <expan xmlns="http://www.tei-c.org/ns/1.0">
-          <xsl:attribute name="abbr"><xsl:value-of select="normalize-space(child::abbr)"/></xsl:attribute>
-          <xsl:apply-templates select="child::expan/w"/>
-        </expan>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:template>
-  
-  <xsl:template match="w">
-    <xsl:variable name="nextLb">
-      <xsl:choose>
-      	<xsl:when test="following::lb">
-      		<xsl:apply-templates select="following::lb[1]" mode="position"/>
-      	</xsl:when>      	
-<!--        <xsl:when test="following::lb[@rend='hyphen']">
-          <xsl:apply-templates select="following::lb[@rend='hyphen'][1]" mode="position"/>
-        </xsl:when>-->
-        <xsl:otherwise>99999999</xsl:otherwise>
-      </xsl:choose>      
-    </xsl:variable>
-    <xsl:variable name="nextW1">
-      <xsl:choose>
-        <xsl:when test="following-sibling::w[1]">
-          <xsl:apply-templates select="following::w[1]" mode="position"/>
-        </xsl:when>
-        <xsl:otherwise>0</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>    
-    <xsl:variable name="nextW2">
-      <xsl:choose>
-        <xsl:when test="following::w[2]">
-          <xsl:apply-templates select="following::w[2]" mode="position"/>
-        </xsl:when>
-        <xsl:otherwise>0</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="ref">
-      <xsl:choose>
-        <xsl:when test="preceding::pb[1][@n]">
-          <xsl:value-of select="concat(ancestor::text/@id,', p. ',preceding::pb[1]/@n)"/>
-        </xsl:when>
-        <xsl:when test="preceding::pb[1][@facs]">
-          <xsl:value-of select="concat(ancestor::text/@id,', p. ',substring-before(preceding::pb[1]/@facs,'.'))"/>
-        </xsl:when>
-        <xsl:otherwise><xsl:value-of select="ancestor::text/@id"/></xsl:otherwise>
-      </xsl:choose>
-      
-    </xsl:variable>
-    <xsl:variable name="lang">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[@lang]"><xsl:value-of select="ancestor::*[@lang][1]/@lang"/></xsl:when>
-        <xsl:when test="ancestor::*[@xml:lang]"><xsl:value-of select="ancestor::*[@xml:lang][1]/@xml:lang"/></xsl:when>
-        <xsl:otherwise>frm</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="nametype">
-      <xsl:choose>
-        <xsl:when test="ancestor::name">
-          <xsl:choose>
-            <xsl:when test="ancestor::name[1][@type]"><xsl:value-of select="ancestor::name[1]/@type"/></xsl:when>
-            <xsl:otherwise>name</xsl:otherwise>
-          </xsl:choose>
-        </xsl:when>
-        <xsl:otherwise>NA</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="lb">
-      <xsl:choose>
-        <xsl:when test="preceding-sibling::*[1][self::lb]">avant</xsl:when>
-        <xsl:when test="following-sibling::*[1][self::lb or self::pb]">après</xsl:when>
-        <xsl:otherwise>non</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="sic">
-      <xsl:choose>
-        <xsl:when test="parent::corr[parent::choice]">
-          <xsl:value-of select="ancestor::choice/sic/w[position()]"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="."></xsl:value-of>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="orig">
-      <xsl:choose>
-        <xsl:when test="parent::reg[parent::choice]">
-          <xsl:value-of select="ancestor::choice/orig/w[position()]"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="."></xsl:value-of>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="abbr">
-      <xsl:choose>
-        <xsl:when test="parent::expan[parent::choice]">
-          <xsl:value-of select="ancestor::choice/abbr/w[position()]"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="."></xsl:value-of>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:choose>
-      <xsl:when test="matches(.,'^\s*[\-=]\s*$') and ($nextW1 &gt; $nextLb)">
-        <xsl:comment>trait d'union effacé</xsl:comment>
-      </xsl:when>      
-      <xsl:when test="matches(.,'[\-=]\s*$') and ($nextW1 &gt; $nextLb)">
-        <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" sic="{$sic}" orig="{$orig}" abbr="{$abbr}">
-          <xsl:apply-templates select="@*"/>
-          <xsl:attribute name="lb">milieu-marqué</xsl:attribute>
-          <xsl:analyze-string select="normalize-space(.)" regex="^(.+)(.)$">
-            <xsl:matching-substring><xsl:value-of select="regex-group(1)"/><lb rend="hyphen({regex-group(2)})"/></xsl:matching-substring>
-          </xsl:analyze-string>
-          <xsl:value-of select="normalize-space(following::w[1])"/>
-        </w>        
-      </xsl:when>
-      <xsl:when test="following::w[1][matches(.,'^\s*[\-=]\s*$')] and ($nextW2 &gt; $nextLb)">
-        <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" sic="{$sic}" orig="{$orig}" abbr="{$abbr}">
-          <xsl:apply-templates select="@*"/>
-          <xsl:attribute name="lb">milieu-marqué2</xsl:attribute>
-          <xsl:value-of select="normalize-space(.)"/><lb rend="hyphen({normalize-space(following::w[1])})"/><xsl:value-of select="normalize-space(following::w[2])"/>
-        </w>
-      </xsl:when>
-      <xsl:when test="not(matches(.,'-\s*$')) and following-sibling::*[1][self::lb[@rend='hyphen']]">
-        <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" sic="{$sic}" orig="{$orig}" abbr="{$abbr}">
-          <xsl:apply-templates select="@*"/>
-          <xsl:attribute name="lb">milieu-non-marqué</xsl:attribute>
-          <xsl:value-of select="normalize-space(.)"/><lb rend="noHyphen"/><xsl:value-of select="normalize-space(following::w[1])"/>
-        </w>
-      </xsl:when>
-      <xsl:when test="preceding-sibling::*[1][self::lb[@rend='hyphen']]">
-        <xsl:comment>fin de mot coupé : <xsl:value-of select="."/></xsl:comment>
-      </xsl:when>
-    	<xsl:when test="preceding-sibling::*[1][self::lb] and preceding-sibling::*[2][self::w[matches(.,'\w[\-=]\s*$')]]">
-    		<xsl:comment>fin de mot coupé (lb non marqué !) : <xsl:value-of select="."/></xsl:comment>
-    	</xsl:when>    	
-      <xsl:when test="preceding-sibling::*[1][matches(@txm:wordPart,'^(end|middle)$')]">
-        <xsl:comment>fin de mot coupé par une balise : <xsl:value-of select="normalize-space(.)"/></xsl:comment>
-      </xsl:when>
-      <xsl:when test="preceding-sibling::*[1][@txm:wordPart='start']">
-        <xsl:choose>
-          <xsl:when test="preceding-sibling::*[1][self::choice][child::reg]">
-            <reg>
-              <xsl:apply-templates select="preceding-sibling::choice[1]/reg/@*"/>
-              <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" sic="{$sic}" abbr="{$abbr}" lb="{$lb}">
-                <xsl:attribute name="orig"><xsl:value-of select="concat(preceding-sibling::choice[1]/orig[1]/w[1],.)"/></xsl:attribute>
-                <xsl:apply-templates select="@*"/>
-                <xsl:value-of select="preceding-sibling::choice[1]/reg/w"/><xsl:apply-templates/>
-              </w>
-            </reg>
-          </xsl:when>
-          <xsl:when test="preceding-sibling::*[1][self::choice][child::corr]">
-            <corr>
-              <xsl:apply-templates select="preceding-sibling::choice[1]/corr/@*"/>
-              <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" orig="{$orig}" abbr="{$abbr}" lb="{$lb}">
-                <xsl:attribute name="sic"><xsl:value-of select="concat(preceding-sibling::choice[1]/sic[1]/w[1],.)"/></xsl:attribute>
-                <xsl:apply-templates select="@*"/>
-                <xsl:value-of select="preceding-sibling::choice[1]/reg/w"/><xsl:apply-templates/>
-              </w>
-            </corr>
-          </xsl:when>
-          <xsl:when test="preceding-sibling::*[1][self::supplied]">
-            <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" orig="{$orig}" abbr="{$abbr}" lb="{$lb}">
-              <xsl:attribute name="sic"><xsl:value-of select="."/></xsl:attribute>
-              <xsl:apply-templates select="@*"/>
-              <supplied xmlns="http://www.tei-c.org/ns/1.0"><xsl:value-of select="preceding-sibling::supplied[1]/w"/></supplied><xsl:apply-templates/>
-            </w>
-          </xsl:when>
-          <xsl:when test="preceding-sibling::*[1][self::subst][child::add]">
-            <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" orig="{$orig}" abbr="{$abbr}" lb="{$lb}" del="{normalize-space(preceding-sibling::subst[1]/del)}">
-                <xsl:attribute name="del"><xsl:value-of select="concat('(',preceding-sibling::subst[1]/del[1]/w[1],')',.)"/></xsl:attribute>
-                <xsl:apply-templates select="@*"/>
-                <xsl:element name="add" namespace="http://www.tei-c.org/ns/1.0">
-<!--                  <xsl:attribute name="rend">inWord</xsl:attribute>-->
-                  <xsl:attribute name="del"><xsl:value-of select="normalize-space(preceding-sibling::subst[1]/del)"/></xsl:attribute>
-                  <xsl:apply-templates select="preceding-sibling::subst[1]/add/@*"/>
-                  <xsl:value-of select="preceding-sibling::subst[1]/add/w"/>
-                </xsl:element><xsl:apply-templates/>
-              </w>
-          </xsl:when>
-          <xsl:otherwise>
-            <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" sic="{$sic}" orig="{$orig}" abbr="{$abbr}" lb="{$lb}">
-              <xsl:apply-templates select="@*"/>
-              <xsl:element name="{local-name(preceding-sibling::*[1])}" namespace="http://www.tei-c.org/ns/1.0">
-                <xsl:value-of select="preceding-sibling::*[1]//w"/>
-              </xsl:element>
-              <xsl:apply-templates/>
-            </w>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:when test="following-sibling::*[1][matches(@txm:wordPart,'^(end|middle)$')]">
-        <xsl:variable name="wordPartPosition">
-          <xsl:value-of select="following-sibling::*[1]/@txm:wordPart"/>
-        </xsl:variable>
-        <xsl:choose>
-          <xsl:when test="following-sibling::*[1][self::choice][child::reg]">
-            <reg>
-              <xsl:apply-templates select="following-sibling::choice[1]/reg/@*"/>
-              <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" sic="{$sic}" abbr="{$abbr}" lb="{$lb}">
-                <xsl:attribute name="orig"><xsl:value-of select="concat(.,following-sibling::choice[1]/orig[1]/w[1])"/>
-                  <xsl:if test="$wordPartPosition='middle'"><xsl:value-of select="following-sibling::w[1]"/></xsl:if>
-                </xsl:attribute>
-                <xsl:apply-templates select="@*"/>
-                <xsl:apply-templates/>
-                <xsl:value-of select="following-sibling::choice[1]/reg/w"/>
-                <xsl:if test="$wordPartPosition='middle'"><xsl:value-of select="following-sibling::w[1]"/></xsl:if>
-              </w>
-            </reg>
-          </xsl:when>
-          <xsl:when test="following-sibling::*[1][self::choice][child::corr]">
-            <corr>
-              <xsl:apply-templates select="following-sibling::choice[1]/corr/@*"/>
-              <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" orig="{$orig}" abbr="{$abbr}" lb="{$lb}">
-                <xsl:attribute name="sic"><xsl:value-of select="concat(.,following-sibling::choice[1]/sic[1]/w[1])"/>
-                  <xsl:if test="$wordPartPosition='middle'"><xsl:value-of select="following-sibling::w[1]"/></xsl:if>
-                </xsl:attribute>
-                <xsl:apply-templates select="@*"/>
-                <xsl:apply-templates/><xsl:value-of select="following-sibling::choice[1]/reg/w"/>
-                <xsl:if test="$wordPartPosition='middle'"><xsl:value-of select="following-sibling::w[1]"/></xsl:if>
-              </w>
-            </corr>
-          </xsl:when>
-          <xsl:when test="following-sibling::*[1][self::supplied]">
-            <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" orig="{$orig}" abbr="{$abbr}" lb="{$lb}">
-              <xsl:attribute name="sic"><xsl:value-of select="."/></xsl:attribute>
-              <xsl:apply-templates select="@*"/>
-              <xsl:apply-templates/><supplied xmlns="http://www.tei-c.org/ns/1.0"><xsl:value-of select="following-sibling::supplied[1]/w"/></supplied>
-              <xsl:if test="$wordPartPosition='middle'"><xsl:value-of select="following-sibling::w[1]"/></xsl:if>
-            </w>
-          </xsl:when>
-          <xsl:when test="following-sibling::*[1][self::subst][child::add]">
-            <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" orig="{$orig}" abbr="{$abbr}" lb="{$lb}" del="{normalize-space(following-sibling::subst[1]/del)}">
-              <xsl:attribute name="del"><xsl:value-of select="concat('(',following-sibling::subst[1]/del[1]/w[1],')',.)"/></xsl:attribute>
-              <xsl:apply-templates select="@*"/>
-              <xsl:apply-templates/>
-              <xsl:element name="add" namespace="http://www.tei-c.org/ns/1.0">
-<!--                <xsl:attribute name="rend">inWord</xsl:attribute>-->
-                <xsl:attribute name="del"><xsl:value-of select="normalize-space(following-sibling::subst[1]/del)"></xsl:value-of></xsl:attribute>
-                <xsl:apply-templates select="following-sibling::subst[1]/add/@*"/>
-                <xsl:value-of select="following-sibling::subst[1]/add/w"/>
-              </xsl:element>
-              <xsl:if test="$wordPartPosition='middle'"><xsl:value-of select="following-sibling::w[1]"/></xsl:if>
-            </w>
-          </xsl:when>
-          <xsl:otherwise>
-            <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" sic="{$sic}" orig="{$orig}" abbr="{$abbr}" lb="{$lb}">
-              <xsl:apply-templates select="@*"/>
-              <xsl:apply-templates/>
-              <xsl:element name="{local-name(following-sibling::*[1])}" namespace="http://www.tei-c.org/ns/1.0">
-                <xsl:value-of select="following-sibling::*[1]//w"/>
-              </xsl:element>
-              <xsl:if test="$wordPartPosition='middle'"><xsl:value-of select="following-sibling::w[1]"/></xsl:if>
-            </w>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:when>
-      <xsl:otherwise>
-        <w xmlns="http://www.tei-c.org/ns/1.0" ref="{$ref}" lang="{$lang}" nametype="{$nametype}" sic="{$sic}" orig="{$orig}" abbr="{$abbr}" lb="{$lb}">
-          <xsl:apply-templates select="@*"/>
-          <xsl:apply-templates select="*|processing-instruction()|comment()|text()"/>
-        </w>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-  
-  <xsl:template match="*[@txm:wordPart]">
-    <xsl:choose>
-      <xsl:when test="matches(local-name(.),'choice') and count(child::*[1]/tei:w) &gt; 1">
-        <xsl:comment>Attention : problème de tokenisation (choice) : <xsl:value-of select="normalize-space(.)"/></xsl:comment>
-        <xsl:for-each select="tei:corr|tei:reg|tei:expan">
-          <xsl:element name="{name(.)}">
-            <xsl:apply-templates select="descendant::tei:w[not(position()=1)]"/>
-          </xsl:element>
-        </xsl:for-each>
-      </xsl:when>
-      <xsl:when test="matches(local-name(.),'subst') and count(child::*[1]/tei:w) &gt; 1">
-        <xsl:comment>Attention : problème de tokenisation (subst) : <xsl:value-of select="normalize-space(.)"/></xsl:comment>
-        <xsl:copy>
-          <xsl:apply-templates select="@*[not(local-name()='wordPart')]"/>
-          <xsl:for-each select="tei:add|tei:del">
-            <xsl:element name="{name(.)}">
-              <xsl:apply-templates select="descendant::tei:w[not(position()=1)]"/>
-            </xsl:element>
-          </xsl:for-each>
-        </xsl:copy>
-      </xsl:when>      
-      <xsl:when test="count(child::w) &gt; 1">
-        <xsl:comment>Attention : problème de tokenisation : <xsl:value-of select="normalize-space(.)"/></xsl:comment>
-        <xsl:copy>
-          <xsl:apply-templates select="@*[not(local-name()='wordPart')]"/>
-          <xsl:apply-templates select="descendant::tei:w[not(position()=1)]"/>
-        </xsl:copy>
-      </xsl:when>
-      <xsl:otherwise><xsl:comment>Mot coupé par une balise : <xsl:value-of select="normalize-space(.)"/></xsl:comment></xsl:otherwise>
-    </xsl:choose>
-    
-  </xsl:template>
-  
-  <xsl:template match="lb[@rend='hyphen' and preceding-sibling::*[1][self::w]]">
-    <xsl:comment>lb déplacé à l'intérieur du mot précédent</xsl:comment>
-  </xsl:template>
-	
-	<xsl:template match="lb[not(@rend='hyphen') and matches(preceding-sibling::tei:w[1],'\w+-\s*$')]">
-		<xsl:comment>Attention : coupure de mot non marquée ! lb déplacé à l'intérieur du mot précédent</xsl:comment>
-		<!--<note xmlns="http://www.tei-c.org/ns/1.0" type="auto">Attention : coupure de mot non marquée !</note>-->
-	</xsl:template>
-	
-  
-  <xsl:template match="s">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/p4top5_perseus.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/p4top5_perseus.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/p4top5_perseus.xsl	(revision 729)
@@ -1,843 +0,0 @@
-<?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"
-  exclude-result-prefixes="tei edate" version="1.0">
-  <!-- 
-       
-       P4 to P5 converter 
-       
-       Sebastian Rahtz <sebastian.rahtz@oucs.ox.ac.uk>
-       
-       $Date: 2007-11-01 16:33:34 +0000 (Thu, 01 Nov 2007) $  $Id: p4top5.xsl 3927 2007-11-01 16:33:34Z rahtz $
-       
-       Copyright 2007 TEI Consortium
-       
-       Permission is hereby granted, free of charge, to any person obtaining
-       a copy of this software and any associated documentation gfiles (the
-       ``Software''), to deal in the Software without restriction, including
-       without limitation the rights to use, copy, modify, merge, publish,
-       distribute, sublicense, and/or sell copies of the Software, and to
-       permit persons to whom the Software is furnished to do so, subject to
-       the following conditions:
-       
-       The above copyright notice and this permission notice shall be included
-       in all copies or substantial portions of the Software.
-       
-  -->
-
-  <!-- Added changes specific to BFM
-       
-       Alexei Lavrentiev
-       
-       2009-11-13
-       
-       p[@rend='gv'] - ab
-       corr[@sic and @rend]
-       
-       2010-03-12
-       including w into corr (for tokenised texts)
-       
-  -->
-  <xsl:output method="xml" encoding="utf-8" cdata-section-elements="tei:eg"
-    omit-xml-declaration="no"/>
-
-  <xsl:variable name="processor">
-    <xsl:value-of select="system-property('xsl:vendor')"/>
-  </xsl:variable>
-
-  <xsl:variable name="today">
-    <xsl:choose>
-      <xsl:when test="function-available('edate:date-time')">
-        <xsl:value-of select="edate:date-time()"/>
-      </xsl:when>
-      <xsl:when test="contains($processor,'SAXON')">
-        <xsl:value-of select="Date:toString(Date:new())" xmlns:Date="/java.util.Date"/>
-      </xsl:when>
-      <xsl:otherwise>0000-00-00</xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="uc">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
-  <xsl:variable name="lc">abcdefghijklmnopqrstuvwxyz</xsl:variable>
-
-  <xsl:template match="*">
-    <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="@*|processing-instruction()|comment()">
-    <xsl:copy/>
-  </xsl:template>
-
-
-  <xsl:template match="text()">
-    <xsl:value-of select="."/>
-  </xsl:template>
-
-
-  <!-- change of name, or replaced by another element -->
-  <xsl:template match="teiCorpus.2">
-    <teiCorpus xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-    </teiCorpus>
-  </xsl:template>
-
-  <xsl:template match="witness/@sigil">
-    <xsl:attribute name="xml:id">
-      <xsl:value-of select="."/>
-    </xsl:attribute>
-  </xsl:template>
-
-  <xsl:template match="witList">
-    <listWit xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-    </listWit>
-  </xsl:template>
-
-
-  <xsl:template match="TEI.2">
-    <TEI xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-    </TEI>
-  </xsl:template>
-
-  <xsl:template match="xref">
-    <xsl:element namespace="http://www.tei-c.org/ns/1.0" name="ref">
-      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-    </xsl:element>
-  </xsl:template>
-
-
-  <xsl:template match="xptr">
-    <xsl:element namespace="http://www.tei-c.org/ns/1.0" name="ptr">
-      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-    </xsl:element>
-  </xsl:template>
-
-
-  <xsl:template match="figure[@url]">
-    <figure xmlns="http://www.tei-c.org/ns/1.0">
-      <graphic xmlns="http://www.tei-c.org/ns/1.0">
-        <xsl:copy-of select="@*"/>
-      </graphic>
-      <xsl:apply-templates/>
-    </figure>
-  </xsl:template>
-
-
-  <xsl:template match="figure/@url"/>
-
-  <xsl:template match="figure/@entity"/>
-
-  <xsl:template match="figure[@entity]">
-    <figure xmlns="http://www.tei-c.org/ns/1.0">
-      <graphic xmlns="http://www.tei-c.org/ns/1.0" url="{unparsed-entity-uri(@entity)}">
-        <xsl:apply-templates select="@*"/>
-      </graphic>
-      <xsl:apply-templates/>
-    </figure>
-  </xsl:template>
-
-  <xsl:template match="event">
-    <incident xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="@*|*|text()|comment()|processing-instruction()"/>
-    </incident>
-  </xsl:template>
-
-  <xsl:template match="state">
-    <refState xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="@*|*|text()|comment()|processing-instruction()"/>
-    </refState>
-  </xsl:template>
-
-
-  <!-- lost elements -->
-  <xsl:template match="dateRange">
-    <date xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-    </date>
-  </xsl:template>
-
-
-  <xsl:template match="dateRange/@from">
-    <xsl:copy-of select="."/>
-  </xsl:template>
-
-  <xsl:template match="dateRange/@to">
-    <xsl:copy-of select="."/>
-  </xsl:template>
-
-  <xsl:template match="language">
-    <xsl:element namespace="http://www.tei-c.org/ns/1.0" name="language">
-      <xsl:if test="@id">
-        <xsl:attribute name="ident">
-          <xsl:value-of select="@id"/>
-        </xsl:attribute>
-      </xsl:if>
-      <xsl:apply-templates select="*|processing-instruction()|comment()|text()"/>
-    </xsl:element>
-  </xsl:template>
-
-  <!-- attributes lost -->
-  <!-- dropped from TEI. Added as new change records later -->
-  <xsl:template match="@date.created"/>
-
-  <xsl:template match="@date.updated"/>
-
-  <!-- dropped from TEI. No replacement -->
-  <xsl:template match="refsDecl/@doctype"/>
-
-  <!-- attributes changed name -->
-
-  <xsl:template match="date/@value">
-    <xsl:attribute name="when">
-      <xsl:value-of select="."/>
-    </xsl:attribute>
-  </xsl:template>
-
-
-  <xsl:template match="@url">
-    <xsl:attribute name="target">
-      <xsl:value-of select="."/>
-    </xsl:attribute>
-  </xsl:template>
-
-
-  <xsl:template match="@doc">
-    <xsl:attribute name="target">
-      <xsl:value-of select="unparsed-entity-uri(.)"/>
-    </xsl:attribute>
-  </xsl:template>
-
-
-  <xsl:template match="@id">
-    <xsl:choose>
-      <xsl:when test="parent::lang">
-        <xsl:attribute name="ident">
-          <xsl:value-of select="."/>
-        </xsl:attribute>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:attribute name="xml:id">
-          <xsl:value-of select="."/>
-        </xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-
-  <xsl:template match="@lang">
-    <xsl:attribute name="xml:lang">
-      <xsl:value-of select="."/>
-    </xsl:attribute>
-  </xsl:template>
-
-
-  <xsl:template match="change/@date"/>
-
-  <xsl:template match="date/@certainty">
-    <xsl:attribute name="cert">
-      <xsl:value-of select="."/>
-    </xsl:attribute>
-  </xsl:template>
-
-  <!-- all pointing attributes preceded by # -->
-
-  <xsl:template match="variantEncoding/@location">
-    <xsl:copy-of select="."/>
-  </xsl:template>
-
-  <xsl:template
-    match="@ana|@active|@adj|@adjFrom|@adjTo|@children|@children|@class|@code|@code|@copyOf|@corresp|@decls|@domains|@end|@exclude|@fVal|@feats|@follow|@from|@hand|@inst|@langKey|@location|@mergedin|@new|@next|@old|@origin|@otherLangs|@parent|@passive|@perf|@prev|@render|@resp|@sameAs|@scheme|@script|@select|@since|@start|@synch|@target|@targetEnd|@to|@to|@value|@value|@who|@wit">
-    <xsl:attribute name="{name(.)}">
-      <xsl:call-template name="splitter">
-        <xsl:with-param name="val">
-          <xsl:value-of select="."/>
-        </xsl:with-param>
-      </xsl:call-template>
-    </xsl:attribute>
-  </xsl:template>
-
-
-  <xsl:template name="splitter">
-    <xsl:param name="val"/>
-    <xsl:choose>
-      <xsl:when test="contains($val,' ')">
-        <xsl:text>#</xsl:text>
-        <xsl:value-of select="substring-before($val,' ')"/>
-        <xsl:text> </xsl:text>
-        <xsl:call-template name="splitter">
-          <xsl:with-param name="val">
-            <xsl:value-of select="substring-after($val,' ')"/>
-          </xsl:with-param>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text>#</xsl:text>
-        <xsl:value-of select="$val"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-
-  <!-- fool around with selected elements -->
-
-
-  <!-- imprint is no longer allowed inside bibl -->
-  <xsl:template match="bibl/imprint">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <xsl:template match="editionStmt/editor">
-    <respStmt xmlns="http://www.tei-c.org/ns/1.0">
-      <resp>
-        <xsl:value-of select="@role"/>
-      </resp>
-      <name>
-        <xsl:apply-templates/>
-      </name>
-    </respStmt>
-  </xsl:template>
-
-  <!-- header -->
-  <!-- BFM special treatment 
-  <xsl:template match="teiHeader">
-    <teiHeader xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="@*|*|comment()|processing-instruction()"/>
-      
-      <xsl:if test="not(revisionDesc) and (@date.created or @date.updated)">
-	<revisionDesc  xmlns="http://www.tei-c.org/ns/1.0">
-	  <xsl:if test="@date.updated">
-	    <change  xmlns="http://www.tei-c.org/ns/1.0">>
-	    <label>updated</label>
-	    <date  xmlns="http://www.tei-c.org/ns/1.0">
-	      <xsl:value-of select="@date.updated"/>
-	    </date>
-	    <label  xmlns="http://www.tei-c.org/ns/1.0">Date edited</label>
-	    </change>
-	  </xsl:if>
-	  <xsl:if test="@date.created">
-	    <change  xmlns="http://www.tei-c.org/ns/1.0">
-	      <label>created</label>
-	      <date  xmlns="http://www.tei-c.org/ns/1.0">
-		<xsl:value-of select="@date.created"/>
-	      </date>
-	      <label  xmlns="http://www.tei-c.org/ns/1.0">Date created</label>
-	    </change>
-	  </xsl:if>
-	</revisionDesc>
-      </xsl:if>
-     [comment]
-	  <change when="{$today}"  xmlns="http://www.tei-c.org/ns/1.0">Converted to TEI P5 XML by p4top5.xsl
-	  written by Sebastian
-	  Rahtz at Oxford University Computing Services.</change>
-	  </revisionDesc>
-	  </xsl:if>
-      [/comment]
-    </teiHeader>
-  </xsl:template>
-  -->
-  <xsl:template match="revisionDesc">
-    <revisionDesc xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="@*|*|comment()|processing-instruction()"/>
-    </revisionDesc>
-  </xsl:template>
-
-  <xsl:template match="publicationStmt">
-    <publicationStmt xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="@*|*|comment()|processing-instruction()"/>
-      <!--
-	  <availability xmlns="http://www.tei-c.org/ns/1.0">
-	  <p xmlns="http://www.tei-c.org/ns/1.0">Licensed under <ptr xmlns="http://www.tei-c.org/ns/1.0" target="http://creativecommons.org/licenses/by-sa/2.0/uk/"/></p>
-	  </availability>
-      -->
-    </publicationStmt>
-  </xsl:template>
-
-  <!-- space does not have @extent any more -->
-  <xsl:template match="space/@extent">
-    <xsl:attribute name="quantity">
-      <xsl:value-of select="."/>
-    </xsl:attribute>
-  </xsl:template>
-
-  <!-- tagsDecl has a compulsory namespace child now -->
-  <xsl:template match="tagsDecl">
-    <xsl:if test="*">
-      <tagsDecl xmlns="http://www.tei-c.org/ns/1.0">
-        <namespace name="http://www.tei-c.org/ns/1.0">
-          <xsl:apply-templates select="*|comment()|processing-instruction"/>
-        </namespace>
-      </tagsDecl>
-    </xsl:if>
-  </xsl:template>
-
-  <!-- orgTitle inside orgName? redundant -->
-  <xsl:template match="orgName/orgTitle">
-    <xsl:apply-templates/>
-  </xsl:template>
-
-  <!-- no need for empty <p> in sourceDesc -->
-  <xsl:template match="sourceDesc/p[string-length(.)=0]"/>
-
-  <!-- start creating the new choice element -->
-  <!-- corr & sic elements: BFM special treatment 
-  <xsl:template match="corr[@sic]">
-    <choice  xmlns="http://www.tei-c.org/ns/1.0">
-      <corr  xmlns="http://www.tei-c.org/ns/1.0">
-	<xsl:value-of select="text()" />
-      </corr>
-      <sic  xmlns="http://www.tei-c.org/ns/1.0">
-	<xsl:value-of select="@sic" />
-      </sic>
-    </choice>
-  </xsl:template>
-  
-  <xsl:template match="sic[@corr]">
-    <choice  xmlns="http://www.tei-c.org/ns/1.0">
-      <sic  xmlns="http://www.tei-c.org/ns/1.0">
-	<xsl:value-of select="text()" />
-      </sic>
-      <corr  xmlns="http://www.tei-c.org/ns/1.0">
-	<xsl:value-of select="@corr" />
-      </corr>
-    </choice>
-  </xsl:template>
-  -->
-  <xsl:template match="abbr[@expan]">
-    <choice xmlns="http://www.tei-c.org/ns/1.0">
-      <abbr xmlns="http://www.tei-c.org/ns/1.0">
-        <xsl:value-of select="text()"/>
-      </abbr>
-      <expan xmlns="http://www.tei-c.org/ns/1.0">
-        <xsl:value-of select="@expan"/>
-      </expan>
-    </choice>
-  </xsl:template>
-
-  <xsl:template match="expan[@abbr]">
-    <choice xmlns="http://www.tei-c.org/ns/1.0">
-      <expan xmlns="http://www.tei-c.org/ns/1.0">
-        <xsl:value-of select="text()"/>
-      </expan>
-      <abbr xmlns="http://www.tei-c.org/ns/1.0">
-        <xsl:value-of select="@abbr"/>
-      </abbr>
-    </choice>
-  </xsl:template>
-
-  <!-- special consideration for <change> element -->
-  <xsl:template match="change">
-    <change xmlns="http://www.tei-c.org/ns/1.0">
-
-      <xsl:apply-templates select="date"/>
-
-      <xsl:if test="respStmt/resp">
-        <label>
-          <xsl:value-of select="respStmt/resp/text()"/>
-        </label>
-      </xsl:if>
-      <xsl:for-each select="respStmt/name">
-        <name xmlns="http://www.tei-c.org/ns/1.0">
-          <xsl:apply-templates select="@*|*|comment()|processing-instruction()|text()"/>
-        </name>
-      </xsl:for-each>
-      <xsl:for-each select="item">
-        <xsl:apply-templates select="@*|*|comment()|processing-instruction()|text()"/>
-      </xsl:for-each>
-    </change>
-  </xsl:template>
-
-
-  <xsl:template match="respStmt[resp]">
-    <respStmt xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:choose>
-        <xsl:when test="resp/name">
-          <resp xmlns="http://www.tei-c.org/ns/1.0">
-            <xsl:value-of select="resp/text()"/>
-          </resp>
-          <xsl:for-each select="resp/name">
-            <name xmlns="http://www.tei-c.org/ns/1.0">
-              <xsl:apply-templates/>
-            </name>
-          </xsl:for-each>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:apply-templates/>
-          <name xmlns="http://www.tei-c.org/ns/1.0"> </name>
-        </xsl:otherwise>
-      </xsl:choose>
-    </respStmt>
-  </xsl:template>
-
-  <xsl:template match="q/@direct"/>
-
-  <xsl:template match="q">
-    <q xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="@*|*|comment()|processing-instruction()|text()"/>
-    </q>
-  </xsl:template>
-
-
-  <!-- if we are reading the P4 with a DTD,
-       we need to avoid copying the default values
-       of attributes -->
-
-  <xsl:template match="@targOrder">
-    <xsl:if test="not(translate(.,$uc,$lc) ='u')">
-      <xsl:attribute name="targOrder">
-        <xsl:value-of select="."/>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-
-  <xsl:template match="@opt">
-    <xsl:if test="not(translate(.,$uc,$lc) ='n')">
-      <xsl:attribute name="opt">
-        <xsl:value-of select="."/>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-
-  <xsl:template match="@to">
-    <xsl:if test="not(translate(.,$uc,$lc) ='ditto')">
-      <xsl:attribute name="to">
-        <xsl:value-of select="."/>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-
-  <xsl:template match="@default">
-    <xsl:choose>
-      <xsl:when test="translate(.,$uc,$lc)= 'no'"/>
-      <xsl:otherwise>
-        <xsl:attribute name="default">
-          <xsl:value-of select="."/>
-        </xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-
-  <xsl:template match="@part">
-    <xsl:if test="not(translate(.,$uc,$lc) ='n')">
-      <xsl:attribute name="part">
-        <xsl:value-of select="."/>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-
-  <xsl:template match="@full">
-    <xsl:if test="not(translate(.,$uc,$lc) ='yes')">
-      <xsl:attribute name="full">
-        <xsl:value-of select="."/>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-
-  <xsl:template match="@from">
-    <xsl:if test="not(translate(.,$uc,$lc) ='root')">
-      <xsl:attribute name="from">
-        <xsl:value-of select="."/>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-
-  <xsl:template match="@status">
-    <xsl:choose>
-      <xsl:when test="parent::teiHeader">
-        <xsl:if test="not(translate(.,$uc,$lc) ='new')">
-          <xsl:attribute name="status">
-            <xsl:value-of select="."/>
-          </xsl:attribute>
-        </xsl:if>
-      </xsl:when>
-      <xsl:when test="parent::del">
-        <xsl:if test="not(translate(.,$uc,$lc) ='unremarkable')">
-          <xsl:attribute name="status">
-            <xsl:value-of select="."/>
-          </xsl:attribute>
-        </xsl:if>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:attribute name="status">
-          <xsl:value-of select="."/>
-        </xsl:attribute>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-
-  <xsl:template match="@place">
-    <xsl:if test="not(translate(.,$uc,$lc) ='unspecified')">
-      <xsl:attribute name="place">
-        <xsl:value-of select="."/>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-
-  <xsl:template match="@sample">
-    <xsl:if test="not(translate(.,$uc,$lc) ='complete')">
-      <xsl:attribute name="sample">
-        <xsl:value-of select="."/>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-
-  <xsl:template match="@org">
-    <xsl:if test="not(translate(.,$uc,$lc) ='uniform')">
-      <xsl:attribute name="org">
-        <xsl:value-of select="."/>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-  <xsl:template match="teiHeader/@type">
-    <xsl:if test="not(translate(.,$uc,$lc) ='text')">
-      <xsl:attribute name="type">
-        <xsl:value-of select="."/>
-      </xsl:attribute>
-    </xsl:if>
-  </xsl:template>
-
-  <!-- yes|no to boolean -->
-
-  <xsl:template match="@anchored">
-    <xsl:attribute name="anchored">
-      <xsl:choose>
-        <xsl:when test="translate(.,$uc,$lc)='yes'">true</xsl:when>
-        <xsl:when test="translate(.,$uc,$lc)='no'">false</xsl:when>
-      </xsl:choose>
-    </xsl:attribute>
-  </xsl:template>
-
-  <xsl:template match="sourceDesc/@default"/>
-
-  <xsl:template match="@tei">
-    <xsl:attribute name="tei">
-      <xsl:choose>
-        <xsl:when test="translate(.,$uc,$lc)='yes'">true</xsl:when>
-        <xsl:when test="translate(.,$uc,$lc)='no'">false</xsl:when>
-      </xsl:choose>
-    </xsl:attribute>
-  </xsl:template>
-
-  <xsl:template match="@langKey"/>
-
-  <xsl:template match="@TEIform"/>
-
-  <!-- assorted atts -->
-  <xsl:template match="@old"/>
-
-  <xsl:template match="@mergedin">
-    <xsl:attribute name="mergedIn">
-      <xsl:value-of select="."/>
-    </xsl:attribute>
-  </xsl:template>
-
-  <!-- deal with the loss of div0 -->
-
-  <xsl:template match="div1|div2|div3|div4|div5|div6">
-    <xsl:variable name="divName">
-      <xsl:choose>
-        <xsl:when test="ancestor::div0">
-          <xsl:text>div</xsl:text>
-          <xsl:value-of select="number(substring-after(local-name(.),'div')) + 1"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <xsl:value-of select="local-name()"/>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:element name="{$divName}" namespace="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-    </xsl:element>
-  </xsl:template>
-
-  <xsl:template match="div0">
-    <div1 xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-    </div1>
-  </xsl:template>
-  
- <xsl:template match="l">
-   <xsl:apply-templates/>
- </xsl:template>
-  
-  <xsl:template match="lb">
-    <xsl:text>&#xA;</xsl:text>
-    <lb xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="@*"></xsl:apply-templates>
-    </lb>
-  </xsl:template>
-  
-  <xsl:template match="sp[child::l]">
-    <sp xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="@*"/>
-      <xsl:text>&#xA;</xsl:text>
-      <xsl:apply-templates select="speaker"/>
-      <xsl:text>&#xA;</xsl:text>
-      <ab><xsl:apply-templates select="l|lb"/></ab>
-    </sp>
-  </xsl:template>
-
-<!--
-  <!-\- BFM specific -\->
-
-  <xsl:template match="p[@rend]">
-    <ab xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="*|@*|processing-instruction()|comment()|text()"/>
-    </ab>
-  </xsl:template>
-
-  <!-\- reducing header -\->
-  <xsl:template match="teiHeader">
-    <teiHeader xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="fileDesc"/>
-    </teiHeader>
-  </xsl:template>
-
-  <xsl:template match="fileDesc">
-    <fileDesc xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:apply-templates select="titleStmt"/>
-      <publicationStmt xmlns="http://www.tei-c.org/ns/1.0"><p xmlns="http://www.tei-c.org/ns/1.0"></p></publicationStmt><sourceDesc xmlns="http://www.tei-c.org/ns/1.0"><p xmlns="http://www.tei-c.org/ns/1.0"></p></sourceDesc>
-    </fileDesc>
-  </xsl:template>
-  
-  <xsl:template match="titleStmt">
-    <titleStmt xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:choose>
-        <xsl:when test="descendant::title[@type='normal']">
-          <xsl:apply-templates select="title[@type='normal']|author"/>
-        </xsl:when>
-        <xsl:otherwise>
-          <title xmlns="http://www.tei-c.org/ns/1.0"><xsl:value-of select="descendant::title[1]"/></title>
-        </xsl:otherwise>
-      </xsl:choose>
-      
-    </titleStmt>
-  </xsl:template>
-  
-
-  <xsl:template name="corr-crochets">
-    <xsl:value-of select="substring-before(@rend,'[')"/>
-    <xsl:element name="supplied" namespace="http://www.tei-c.org/ns/1.0">
-      <xsl:if test="string-length(@sic) &gt; 0">
-        <xsl:attribute name="rend">word_part</xsl:attribute>
-      </xsl:if>
-      <xsl:value-of select="substring-before(substring-after(@rend,'['),']')"/>
-    </xsl:element>
-    <xsl:value-of select="substring-after(@rend,']')"/>
-  </xsl:template>
-
-  <xsl:template match="corr[@sic]">
-    <choice xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:element name="corr" namespace="http://www.tei-c.org/ns/1.0">
-        <xsl:if test="@resp">
-          <xsl:attribute name="resp">
-            <xsl:value-of select="@resp"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:if test="@rend[not(contains(.,'crochets')) and not(contains(.,'['))]">
-          <xsl:attribute name="rend">
-            <xsl:value-of select="@rend"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:choose>
-          <xsl:when test="contains(@rend,'[') and contains(@rend,']')">
-            <xsl:choose>
-              <xsl:when test="child::w">
-                <xsl:text>&#xA;</xsl:text>
-                <xsl:element name="w" namespace="http://www.tei-c.org/ns/1.0">
-                  <xsl:call-template name="corr-crochets"/>
-                </xsl:element>
-                <xsl:text>&#xA;</xsl:text>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:call-template name="corr-crochets"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:when>
-          <xsl:when test="string-length(@sic) = 0">
-            <xsl:element name="supplied" namespace="http://www.tei-c.org/ns/1.0">
-              <xsl:apply-templates select="@resp|@rend|*|text()"/>
-            </xsl:element>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="@resp|@rend|*|text()"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:element>
-      <xsl:element name="sic" namespace="http://www.tei-c.org/ns/1.0">
-        <xsl:value-of select="@sic"/>
-      </xsl:element>
-    </choice>
-  </xsl:template>
-
-  <xsl:template match="sic[@corr]">
-    <choice xmlns="http://www.tei-c.org/ns/1.0">
-      <xsl:element name="corr" namespace="http://www.tei-c.org/ns/1.0">
-        <xsl:if test="@resp">
-          <xsl:attribute name="resp">
-            <xsl:value-of select="@resp"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:if test="@rend[not(contains(.,'crochets')) and not(contains(.,'['))]">
-          <xsl:attribute name="rend">
-            <xsl:value-of select="@rend"/>
-          </xsl:attribute>
-        </xsl:if>
-        <xsl:choose>
-          <xsl:when test="contains(@rend,'[') and contains(@rend,']')">
-            <xsl:choose>
-              <xsl:when test="child::w">
-                <xsl:text>&#xA;</xsl:text>
-                <xsl:element name="w" namespace="http://www.tei-c.org/ns/1.0">
-                  <xsl:call-template name="corr-crochets"/>
-                </xsl:element>
-                <xsl:text>&#xA;</xsl:text>
-              </xsl:when>
-              <xsl:otherwise>
-                <xsl:call-template name="corr-crochets"/>
-              </xsl:otherwise>
-            </xsl:choose>
-          </xsl:when>
-          <xsl:when test="string-length(.) = 0">
-            <xsl:element name="supplied" namespace="http://www.tei-c.org/ns/1.0">
-              <xsl:apply-templates select="@resp|@rend|*|text()"/>
-            </xsl:element>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:apply-templates select="@resp|@rend"/>
-            <xsl:value-of select="@corr"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:element>
-      <xsl:element name="sic" namespace="http://www.tei-c.org/ns/1.0">
-        <xsl:apply-templates/>
-      </xsl:element>
-    </choice>
-  </xsl:template>
-
-
--->
-</xsl:stylesheet>
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-corpusakkadien-xmlw_syllabes-cuneiform.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-corpusakkadien-xmlw_syllabes-cuneiform.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-corpusakkadien-xmlw_syllabes-cuneiform.xsl	(revision 729)
@@ -1,168 +0,0 @@
-<?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>
-      Cette feuille de style permet de préparer les transcriptions de tablettes
-      d'argile (projet UMR PROCLAC) à l'import XML/W + CSV de TXM en tokenisant
-      le corpus au niveau des syllabes.
-      Les propriétés de mots sont projetées vers les propriétés des syllabes (line,
-      lemma, pos).
-      Les propriétés unclear et supplied prennent la valeur "yes" si la syllabe se
-      trouve à l'intérieur de la balise correspondante.
-    </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>2014-2015, CNRS / ICAR (équipe CACTUS)</xd:copyright>
-  </xd:doc>
-  
-  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no"/>
-  
-  <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="*[local-name()='teiHeader']"/>
-  
-<!--  <xsl:template match="*[local-name()='w']//text()">
-    <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>
-    <xsl:variable name="pos"><xsl:value-of select="ancestor::*[local-name()='w']/@pos"/></xsl:variable>
-    <xsl:variable name="word-form"><xsl:value-of select="ancestor::*[local-name()='w']"/></xsl:variable>
-    <xsl:variable name="unclear">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[local-name()='unclear']">yes</xsl:when>
-        <xsl:otherwise>no</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="supplied">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[local-name()='supplied']">yes</xsl:when>
-        <xsl:otherwise>no</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    
-    <xsl:analyze-string select="." regex="[-.]|\([^\)]*\)">
-      <xsl:matching-substring>
-        <w line="{$line}" lemma="{$lemma}" pos="{$pos}" word-form="{$word-form}" supplied="{$supplied}" unclear="{$unclear}"><xsl:value-of select="."/></w>
-      </xsl:matching-substring>
-      <xsl:non-matching-substring>
-        <w line="{$line}" lemma="{$lemma}" pos="{$pos}" word-form="{$word-form}" supplied="{$supplied}" unclear="{$unclear}"><xsl:value-of select="."/></w>
-      </xsl:non-matching-substring>
-    </xsl:analyze-string>    
-  </xsl:template>-->
-
-<!--<xsl:template match="text()[not(ancestor::*[local-name()='w'])]">
-  <xsl:analyze-string select="." regex="\[…\]">
-    <xsl:matching-substring>
-      <w line="¤" lemma="¤" pos="¤" word-form="¤" supplied="¤" unclear="¤"><xsl:value-of select="."/></w>
-    </xsl:matching-substring>
-    <xsl:non-matching-substring><xsl:comment><xsl:copy-of select="."/></xsl:comment></xsl:non-matching-substring>
-  </xsl:analyze-string>
-</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>
-    <xsl:variable name="pos"><xsl:value-of select="ancestor::*[local-name()='w']/@pos"/></xsl:variable>
-    <xsl:variable name="word-form">
-      <xsl:for-each select="ancestor::*[local-name()='w']/descendant::*[local-name()='g']">
-        <xsl:value-of select="."/>
-        <xsl:if test="following-sibling::*[local-name()='g']">-</xsl:if>
-      </xsl:for-each>
-    </xsl:variable>
-    <xsl:variable name="unclear">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[local-name()='unclear']">yes</xsl:when>
-        <xsl:otherwise>no</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="supplied">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[local-name()='supplied']">yes</xsl:when>
-        <xsl:otherwise>no</xsl:otherwise>
-      </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="decimal">
-      <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>
-    
-  </xsl:template>
-
-  <xsl:template match="*[local-name()='w']">
-  <word>
-    <xsl:apply-templates select="@*"/>
-    <xsl:attribute name="no-supplied">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[local-name()='supplied']">¤</xsl:when>
-        <xsl:otherwise>      
-          <xsl:for-each select="descendant::*[local-name()='g']">
-          <xsl:value-of select="."/>
-          <xsl:if test="following-sibling::*[local-name()='g']">-</xsl:if>
-        </xsl:for-each>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>
-    <xsl:attribute name="no-unclear">
-      <xsl:choose>
-        <xsl:when test="ancestor::*[local-name()='supplied'] or ancestor::*[local-name()='unclear']">¤</xsl:when>
-        <xsl:otherwise>
-          <xsl:for-each select="descendant::*[local-name()='g']">
-            <xsl:value-of select="."/>
-            <xsl:if test="following-sibling::*[local-name()='g']">-</xsl:if>
-          </xsl:for-each>
-        </xsl:otherwise>
-      </xsl:choose>
-    </xsl:attribute>    
-    <xsl:apply-templates/>
-  </word>
-</xsl:template>
-
-
-  <xsl:template name="hex2num">
-    <xsl:param name="hex"/>
-    <xsl:param name="num" select="0"/>
-    <xsl:param name="MSB" select="translate(substring($hex, 1, 1), 'abcdef', 'ABCDEF')"/>
-    <xsl:param name="value" select="string-length(substring-before('0123456789ABCDEF', $MSB))"/>
-    <xsl:param name="result" select="16 * $num + $value"/>
-    <xsl:choose>
-      <xsl:when test="string-length($hex) > 1">
-        <xsl:call-template name="hex2num">
-          <xsl:with-param name="hex" select="substring($hex, 2)"/>
-          <xsl:with-param name="num" select="$result"/>
-        </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$result"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teicorpustextgrid-xmlw.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teicorpustextgrid-xmlw.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/txm-filter-teicorpustextgrid-xmlw.xsl	(revision 729)
@@ -1,82 +0,0 @@
-<?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>
-      This stylesheet prepares TextGrid TEI corpus for TXM xml/w import module
-    </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>2014, CNRS / ICAR (CACTUS)</xd:copyright>
-  </xd:doc>
-  
-  
-  
-<!-- 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="/">
-  	<note>See output files in the OUT directory</note>
-  	<xsl:for-each select="descendant::tei:TEI">
-  		<xsl:variable name="author"><xsl:value-of select="tei:teiHeader[1]/tei:fileDesc[1]/tei:sourceDesc[1]/tei:biblFull[1]/tei:titleStmt[1]/tei:author[1]"></xsl:value-of></xsl:variable>
-  		<xsl:variable name="authorNorm"><xsl:value-of select="replace($author,'[, ]','')"/></xsl:variable>
-  		<xsl:variable name="title"><xsl:value-of select="tei:teiHeader[1]/tei:fileDesc[1]/tei:titleStmt[1]/tei:title[1]"></xsl:value-of></xsl:variable>
-  		<xsl:variable name="titleNorm"><xsl:value-of select="replace($title,'[, \[\]]','')"/></xsl:variable>
-  		<xsl:variable name="creationDate"><xsl:choose>
-  			<xsl:when test="tei:teiHeader[1]/tei:profileDesc[1]/tei:creation[1]/tei:date[1]/@when">
-  				<xsl:value-of select="tei:teiHeader[1]/tei:profileDesc[1]/tei:creation[1]/tei:date[1]/@when"/>
-  			</xsl:when>
-  			<xsl:when test="tei:teiHeader[1]/tei:profileDesc[1]/tei:creation[1]/tei:date[1]/@notAfter">
-  				<xsl:value-of select="tei:teiHeader[1]/tei:profileDesc[1]/tei:creation[1]/tei:date[1]/@notAfter"/>
-  			</xsl:when>
-  			<xsl:when test="tei:teiHeader[1]/tei:profileDesc[1]/tei:creation[1]/tei:date[1]/@notBefore">
-  				<xsl:value-of select="tei:teiHeader[1]/tei:profileDesc[1]/tei:creation[1]/tei:date[1]/@notBefore"/>
-  			</xsl:when>
-  			<xsl:otherwise>9999</xsl:otherwise>
-  		</xsl:choose>
-  		</xsl:variable>
-  		<xsl:result-document href="{$filedir}/out/{$creationDate}{$authorNorm}{$titleNorm}.xml">
-  			<xsl:copy>
-  				<xsl:copy-of select="@*"/>
-  				<xsl:comment>teiHeafer deleted for TXM xml/w import module</xsl:comment>
-  				<xsl:element name="text" namespace="http://www.tei-c.org/ns/1.0">
-  					<xsl:attribute name="author"><xsl:value-of select="$author"/></xsl:attribute>
-  					<xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute>
-  					<xsl:attribute name="creationDate"><xsl:value-of select="$creationDate"/></xsl:attribute>
-  					<xsl:for-each select="tei:text/*">
-  						<xsl:copy-of select="."/>
-  					</xsl:for-each>
-  				</xsl:element>
-  			</xsl:copy>
-  		</xsl:result-document>
-  	</xsl:for-each>  
-  </xsl:template>
-  
-</xsl:stylesheet>
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/xsl/svn2cl.xsl
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/xsl/svn2cl.xsl	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/xsl/svn2cl.xsl	(revision 729)
@@ -1,500 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-	USAGE:
-	svn log --xml --verbose > foo.txt
-	xsltproc etc/svn2cl.xsl foo.txt > ChangeLog
-
-
-   svn2cl.xsl - xslt stylesheet for converting svn log to a normal
-                changelog
-
-   version 0.11
-
-   Usage (replace ++ with two minus signs which aren't allowed
-   inside xml comments):
-     svn ++verbose ++xml log | \
-       xsltproc ++stringparam strip-prefix `basename $(pwd)` \
-                ++stringparam linelen 75 \
-                ++stringparam groupbyday yes \
-                ++stringparam separate-daylogs yes \
-                ++stringparam include-rev yes \
-                ++stringparam include-actions yes \
-                ++stringparam breakbeforemsg yes/2 \
-                ++stringparam reparagraph yes \
-                ++stringparam authorsfile FILE \
-                ++stringparam ignore-message-starting \
-                svn2cl.xsl - > ChangeLog
-
-   This file is based on several implementations of this conversion
-   that I was not completely happy with and some other common
-   xslt constructs found on the web.
-
-   Copyright (C) 2004, 2005, 2006, 2007 Arthur de Jong.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. 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.
-   3. The name of the author may not be used to endorse or promote
-      products derived from this software without specific prior
-      written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
-
--->
-
-<!DOCTYPE xsl:stylesheet [
- <!ENTITY tab "&#9;">
- <!ENTITY newl "&#38;#xA;">
- <!ENTITY space "&#32;">
-]>
-
-<xsl:stylesheet
-  version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:output
-   method="text"
-   encoding="utf-8"
-   media-type="text/plain"
-   omit-xml-declaration="yes"
-   standalone="yes"
-   indent="no" />
-
- <xsl:strip-space elements="*" />
-
- <!-- the prefix of pathnames to strip -->
- <xsl:param name="strip-prefix" select="'/'" />
-
- <!-- the length of a line to wrap messages at -->
- <xsl:param name="linelen" select="75" />
-
- <!-- whether entries should be grouped by day -->
- <xsl:param name="groupbyday" select="'no'" />
-
- <!-- whether to seperate log messages by empty lines -->
- <xsl:param name="separate-daylogs" select="'no'" />
-
- <!-- whether a revision number should be included -->
- <xsl:param name="include-rev" select="'no'" />
-
- <!-- whether aaction labels should be added to files -->
- <xsl:param name="include-actions" select="'no'" />
-
- <!-- whether the log message should start on a new line -->
- <xsl:param name="breakbeforemsg" select="'no'" />
-
- <!-- whether the message should be rewrapped within one paragraph -->
- <xsl:param name="reparagraph" select="'no'" />
-
- <!-- whether certain messages should be ignored -->
- <xsl:param name="ignore-message-starting" select="''" />
-
- <!-- location of authors file if any -->
- <xsl:param name="authorsfile" select="''" />
- <xsl:key name="author-lookup" match="author" use="@uid" />
- <xsl:variable name="authors-top" select="document($authorsfile)/authors" />
-
- <!-- match the topmost log entry -->
- <xsl:template match="log">
-  <xsl:choose>
-   <xsl:when test="$ignore-message-starting != ''">
-    <!-- only handle logentries with don't contain the string -->
-    <xsl:apply-templates select="logentry[not(starts-with(msg,$ignore-message-starting))]" />
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:apply-templates select="logentry" />
-   </xsl:otherwise>
-  </xsl:choose>
-  <!-- add newlines at the end of the changelog -->
-  <xsl:text>&newl;</xsl:text>
- </xsl:template>
-
- <!-- format one entry from the log -->
- <xsl:template match="logentry">
-  <xsl:choose>
-   <!-- if we're grouping we should omit some headers -->
-   <xsl:when test="$groupbyday='yes'">
-    <!-- save log entry number -->
-    <xsl:variable name="pos" select="position()" />
-    <!-- fetch previous entry's date -->
-    <xsl:variable name="prevdate">
-     <xsl:apply-templates select="../logentry[position()=(($pos)-1)]/date" />
-    </xsl:variable>
-    <!-- fetch previous entry's author -->
-    <xsl:variable name="prevauthor">
-     <xsl:value-of select="normalize-space(../logentry[position()=(($pos)-1)]/author)" />
-    </xsl:variable>
-    <!-- fetch this entry's date -->
-    <xsl:variable name="date">
-     <xsl:apply-templates select="date" />
-    </xsl:variable>
-    <!-- fetch this entry's author -->
-    <xsl:variable name="author">
-     <xsl:value-of select="normalize-space(author)" />
-    </xsl:variable>
-    <!-- check if header is changed -->
-    <xsl:if test="($prevdate!=$date) or ($prevauthor!=$author)">
-     <!-- add newline -->
-     <xsl:if test="not(position()=1)">
-      <xsl:text>&newl;</xsl:text>
-     </xsl:if>
-     <!-- date -->
-     <xsl:value-of select="$date" />
-     <!-- two spaces -->
-     <xsl:text>&space;&space;</xsl:text>
-     <!-- author's name -->
-     <xsl:apply-templates select="author" />
-     <!-- two newlines -->
-     <xsl:text>&newl;</xsl:text>
-     <xsl:if test="$separate-daylogs!='yes'"><xsl:text>&newl;</xsl:text></xsl:if>
-    </xsl:if>
-   </xsl:when>
-   <!-- write the log header -->
-   <xsl:otherwise>
-    <!-- add newline -->
-    <xsl:if test="not(position()=1)">
-     <xsl:text>&newl;</xsl:text>
-    </xsl:if>
-    <!-- date -->
-    <xsl:apply-templates select="date" />
-    <!-- two spaces -->
-    <xsl:text>&space;&space;</xsl:text>
-    <!-- author's name -->
-    <xsl:apply-templates select="author" />
-    <!-- two newlines -->
-    <xsl:text>&newl;&newl;</xsl:text>
-   </xsl:otherwise>
-  </xsl:choose>
-  <!-- get paths string -->
-  <xsl:variable name="paths">
-   <xsl:apply-templates select="paths" />
-  </xsl:variable>
-  <!-- get revision number -->
-  <xsl:variable name="rev">
-   <xsl:if test="$include-rev='yes'">
-    <xsl:text>[r</xsl:text>
-    <xsl:value-of select="@revision" />
-    <xsl:text>]&space;</xsl:text>
-   </xsl:if>
-  </xsl:variable>
-  <!-- trim trailing newlines -->
-  <xsl:variable name="msg">
-   <!-- add a line break before the log message -->
-   <xsl:choose>
-    <xsl:when test="$breakbeforemsg='yes'">
-     <xsl:text>&newl;</xsl:text>
-    </xsl:when>
-    <xsl:when test="number($breakbeforemsg)&gt;0">
-     <xsl:call-template name="newlines">
-      <xsl:with-param name="count" select="number($breakbeforemsg)" />
-     </xsl:call-template>
-    </xsl:when>
-   </xsl:choose>
-   <xsl:call-template name="trim-newln">
-    <xsl:with-param name="txt" select="msg" />
-   </xsl:call-template>
-  </xsl:variable>
-  <!-- add newline here if separate-daylogs is in effect -->
-  <xsl:if test="$groupbyday='yes' and $separate-daylogs='yes'"><xsl:text>&newl;</xsl:text></xsl:if>
-  <!-- first line is indented (other indents are done in wrap template) -->
-  <xsl:text>&tab;*&space;</xsl:text>
-  <!-- set up the text to wrap -->
-  <xsl:variable name="txt">
-   <xsl:value-of select="$rev" />
-   <xsl:if test="$paths!=''">
-    <xsl:value-of select="concat($paths,':&space;')" />
-   </xsl:if>
-   <xsl:value-of select="$msg" />
-  </xsl:variable>
-  <!-- print the paths and message nicely wrapped -->
-  <xsl:call-template name="wrap">
-   <xsl:with-param name="txt" select="$txt" />
-  </xsl:call-template>
- </xsl:template>
-
- <!-- format date -->
- <xsl:template match="date">
-  <xsl:variable name="date" select="normalize-space(.)" />
-  <!-- output date part -->
-  <xsl:value-of select="substring($date,1,10)" />
-  <!-- output time part -->
-  <xsl:if test="$groupbyday!='yes'">
-   <xsl:text>&space;</xsl:text>
-   <xsl:value-of select="substring($date,12,5)" />
-  </xsl:if>
- </xsl:template>
-
- <!-- format author -->
- <xsl:template match="author">
-  <xsl:variable name="uid" select="normalize-space(.)" />
-  <!-- try to lookup author in authorsfile -->
-  <xsl:choose>
-   <xsl:when test="$authorsfile!=''">
-    <xsl:for-each select="$authors-top">
-     <xsl:variable name="author" select="key('author-lookup',$uid)" />
-     <!-- present result -->
-     <xsl:choose>
-      <xsl:when test="string($author/.)">
-       <xsl:apply-templates select="$author/node()" mode="copy" />
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:value-of select="$uid" />
-      </xsl:otherwise>
-     </xsl:choose>
-    </xsl:for-each>
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:value-of select="$uid" />
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <!-- copy but normalize text -->
- <xsl:template match="text()" mode="copy">
-  <xsl:value-of select="normalize-space(.)" />
- </xsl:template>
-
- <!-- simple copy template -->
- <xsl:template match="@*|node()" mode="copy">
-  <xsl:copy>
-   <xsl:apply-templates select="@*|node()" mode="copy" />
-  </xsl:copy>
- </xsl:template>
-
- <!-- present a list of paths names -->
- <xsl:template match="paths">
-  <xsl:choose>
-   <!-- only handle paths that begin with the path and strip the path -->
-   <xsl:when test="$strip-prefix != ''">
-    <!-- if strip-prefix does not start with a slash, prepend it -->
-    <xsl:variable name="tmpstrip1">
-     <xsl:choose>
-      <xsl:when test="starts-with($strip-prefix,'/')">
-       <xsl:value-of select="$strip-prefix" />
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:value-of select="concat('/',$strip-prefix)" />
-      </xsl:otherwise>
-     </xsl:choose>
-    </xsl:variable>
-    <!-- strip trailing slash from strip-prefix -->
-    <xsl:variable name="tmpstrip2">
-     <xsl:choose>
-      <xsl:when test="substring($tmpstrip1,string-length($tmpstrip1),1)='/'">
-       <xsl:value-of select="substring($tmpstrip1,1,string-length($tmpstrip1)-1)" />
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:value-of select="$tmpstrip1" />
-      </xsl:otherwise>
-     </xsl:choose>
-    </xsl:variable>
-    <!-- filter on all entries within directory -->
-    <xsl:for-each select="path[starts-with(concat(normalize-space(.),'/'),concat($tmpstrip2,'/'))]">
-     <xsl:sort select="normalize-space(.)" data-type="text" />
-     <!-- unless we are the first entry, add a comma -->
-     <xsl:if test="not(position()=1)">
-      <xsl:text>,&space;</xsl:text>
-     </xsl:if>
-     <!-- print the path name -->
-     <xsl:call-template name="printpath">
-      <xsl:with-param name="path" select="substring(normalize-space(.),string-length($strip-prefix)+3)" />
-     </xsl:call-template>
-     <!-- add the action flag -->
-     <xsl:if test="$include-actions='yes'">
-      <xsl:apply-templates select="." mode="action"/>
-     </xsl:if>
-    </xsl:for-each>
-   </xsl:when>
-   <!-- print a simple list of all paths -->
-   <xsl:otherwise>
-    <xsl:for-each select="path">
-     <xsl:sort select="normalize-space(.)" data-type="text" />
-     <!-- unless we are the first entry, add a comma -->
-     <xsl:if test="not(position()=1)">
-      <xsl:text>,&space;</xsl:text>
-     </xsl:if>
-     <!-- print the path name -->
-     <xsl:value-of select="normalize-space(.)" />
-     <!-- add the action flag -->
-     <xsl:if test="$include-actions='yes'">
-      <xsl:apply-templates select="." mode="action"/>
-     </xsl:if>
-    </xsl:for-each>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <xsl:template match="path" mode="action">
-  <xsl:choose>
-   <xsl:when test="@action='D'">
-    <xsl:text>[DEL]</xsl:text>
-   </xsl:when>
-   <xsl:when test="@copyfrom-path">
-    <xsl:text>[CPY]</xsl:text>
-   </xsl:when>
-   <xsl:when test="@action='D'">
-    <xsl:text>[ADD]</xsl:text>
-   </xsl:when>
-  </xsl:choose>
- </xsl:template>
-
- <!-- transform path to something printable -->
- <xsl:template name="printpath">
-  <!-- fetch the pathname -->
-  <xsl:param name="path" />
-  <!-- strip leading slash -->
-  <xsl:variable name="tmp1">
-   <xsl:choose>
-    <xsl:when test="starts-with($path,'/')">
-     <xsl:value-of select="substring($path,2)" />
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="$path" />
-    </xsl:otherwise>
-   </xsl:choose>
-  </xsl:variable>
-  <!-- translate empty string to dot -->
-  <xsl:choose>
-   <xsl:when test="$tmp1 = ''">
-    <xsl:text>.</xsl:text>
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:value-of select="$tmp1" />
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <!-- string-wrapping template -->
- <xsl:template name="wrap">
-  <xsl:param name="txt" />
-  <xsl:variable name="normtxt" select="normalize-space($txt)" />
-  <xsl:choose>
-   <xsl:when test="contains($txt,'&newl;')">
-     <!-- text contains newlines, do the first line -->
-     <xsl:call-template name="wrap">
-      <xsl:with-param name="txt" select="substring-before($txt,'&newl;')" />
-     </xsl:call-template>
-     <!-- print tab -->
-     <xsl:text>&tab;&space;&space;</xsl:text>
-     <!-- wrap the rest of the text -->
-     <xsl:call-template name="wrap">
-      <xsl:with-param name="txt" select="substring-after($txt,'&newl;')" />
-     </xsl:call-template>
-   </xsl:when>
-   <xsl:when test="(string-length($normtxt) &lt; (($linelen)-9)) or not(contains($normtxt,' '))">
-    <!-- this is easy, nothing to do -->
-    <xsl:value-of select="$normtxt" />
-    <!-- add newline -->
-    <xsl:text>&newl;</xsl:text>
-   </xsl:when>
-   <xsl:otherwise>
-    <!-- find the first line -->
-    <xsl:variable name="tmp" select="substring($normtxt,1,(($linelen)-9))" />
-    <xsl:variable name="line">
-     <xsl:choose>
-      <!-- if our attempt contains spaces wrap on that -->
-      <xsl:when test="contains($tmp,' ')">
-       <xsl:call-template name="find-line">
-        <xsl:with-param name="txt" select="$tmp" />
-       </xsl:call-template>
-      </xsl:when>
-      <!-- otherwise use the first non-space characters from the text -->
-      <xsl:otherwise>
-       <xsl:value-of select="substring-before($normtxt,' ')" />
-      </xsl:otherwise>
-     </xsl:choose>
-    </xsl:variable>
-    <!-- print line -->
-    <xsl:value-of select="$line" />
-    <!-- print newline and tab -->
-    <xsl:text>&newl;&tab;&space;&space;</xsl:text>
-    <!-- wrap the rest of the text -->
-    <xsl:call-template name="wrap">
-     <xsl:with-param name="txt" select="normalize-space(substring($normtxt,string-length($line)+1))" />
-    </xsl:call-template>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <!-- template to trim line to contain space as last char -->
- <xsl:template name="find-line">
-  <xsl:param name="txt" />
-  <xsl:choose>
-   <xsl:when test="substring($txt,string-length($txt),1)=' '">
-    <xsl:value-of select="substring($txt,1,string-length($txt)-1)" />
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:call-template name="find-line">
-     <xsl:with-param name="txt" select="substring($txt,1,string-length($txt)-1)" />
-    </xsl:call-template>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <!-- template to trim trailing and starting newlines -->
- <xsl:template name="trim-newln">
-  <xsl:param name="txt" />
-  <xsl:choose>
-   <!-- find starting newlines -->
-   <xsl:when test="substring($txt,1,1) = '&newl;'">
-    <xsl:call-template name="trim-newln">
-     <xsl:with-param name="txt" select="substring($txt,2)" />
-    </xsl:call-template>
-   </xsl:when>
-   <!-- find trailing newlines -->
-   <xsl:when test="substring($txt,string-length($txt),1) = '&newl;'">
-    <xsl:call-template name="trim-newln">
-     <xsl:with-param name="txt" select="substring($txt,1,string-length($txt)-1)" />
-    </xsl:call-template>
-   </xsl:when>
-   <!-- if the message has paragrapgs, find the first one -->
-   <xsl:when test="$reparagraph='yes' and contains($txt,'&newl;&newl;')">
-     <!-- remove newlines from first paragraph -->
-     <xsl:value-of select="normalize-space(substring-before($txt,'&newl;&newl;'))" />
-     <!-- paragraph separator -->
-     <xsl:text>&newl;&newl;</xsl:text>
-     <!-- do the rest of the text -->
-     <xsl:call-template name="trim-newln">
-      <xsl:with-param name="txt" select="substring-after($txt,'&newl;&newl;')" />
-     </xsl:call-template>
-   </xsl:when>
-   <!-- remove more single newlines -->
-   <xsl:when test="$reparagraph='yes'">
-    <xsl:value-of select="normalize-space($txt)" />
-   </xsl:when>
-   <!-- no newlines found, we're done -->
-   <xsl:otherwise>
-    <xsl:value-of select="$txt" />
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <!-- insert a number of newlines -->
- <xsl:template name="newlines">
-  <xsl:param name="count" />
-  <xsl:text>&newl;</xsl:text>
-  <xsl:if test="$count&gt;1">
-   <xsl:call-template name="newlines">
-    <xsl:with-param name="count" select="($count)-1" />
-   </xsl:call-template>
-  </xsl:if>
- </xsl:template>
-
-</xsl:stylesheet>

Property changes on: tmp/trunk/org.txm.setups/shared/all/xsl
___________________________________________________________________
Added: svn:ignore
   + **


Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/bfmLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/bfmLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/bfmLoader.groovy	(revision 729)
@@ -1,218 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-//
-// This file is part of the TXM platform.
-//
-// The TXM platform is free software: you can redistribute it and/or modif y
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The TXM platform 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with the TXM platform.  If not, see <http://www.gnu.org/licenses/>.
-//
-//
-//
-// $LastChangedDate: 2016-03-01 10:10:58 +0100 (mar., 01 mars 2016) $
-// $LastChangedRevision: 3133 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.bfm;
-
-import javax.xml.stream.XMLStreamReader;
-import org.txm.importer.ApplyXsl2;
-import org.txm.importer.bfm.importer;
-import org.txm.importer.bfm.compiler;
-import org.txm.importer.bfm.pager;
-import org.txm.objects.*;
-import org.txm.*;
-import org.txm.utils.i18n.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.importer.*;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-import org.txm.utils.*;
-
-String userDir = System.getProperty("user.home");
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-def MONITOR;
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/bfm/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-		//rootDir = userDir+"/xml/TESTS/alceste";  // directory which contains the source file
-
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		//Toolbox.setParam(Toolbox.INSTALL_DIR,new File("C:\\Program Files\\TXM"));//For Windows
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		//Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File("C:\\Program Files\\treetagger"));//for Windows
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File("C:\\Program Files\\treetagger\\models"));//for Windows
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir,"txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-// BFM XPATH PARAMETERS
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(1, "READ XPATH PARAMETERS")
-File paramDeclarationFile = new File(srcDir, "import.properties");
-Properties metadataXPath = new Properties();
-if (paramDeclarationFile.exists() && paramDeclarationFile.canRead()) {
-	InputStreamReader input = new InputStreamReader(new FileInputStream(paramDeclarationFile) , "UTF-8");
-	metadataXPath.load(input);
-	input.close();
-
-	if (!metadataXPath.containsKey("titre"))
-		println "Warning: parameters property file does not contain the 'titre' metadata"
-	if (!metadataXPath.containsKey("forme"))
-		println "Warning: parameters property file does not contain the 'forme' metadata in param values. The default value is 'prose'"
-}
-else
-	println "No '$paramDeclarationFile' file found"
-
-// Apply XSL
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(1, "APPLYING XSL")
-if (xsl != null && xslParams != null && xsl.trim().length() > 0) {
-	if (ApplyXsl2.processImportSources(new File(xsl), srcDir, new File(binDir, "src"), xslParams))
-	// return; // error during process
-	srcDir = new File(binDir, "src");
-	println ""
-}
-
-// copy txm files
-println "-- VALIDATION - checking XML source files well-formedness"
-List<File> srcfiles = srcDir.listFiles();
-for (File f : srcfiles) { // check XML format, and copy file into binDir
-	if (f.isHidden() || f.getName().equals("import.xml") || f.getName().equals("metadata.csv") || f.getName().endsWith(".properties"))
-		continue;
-	if (ValidateXml.test(f)) {
-		FileCopy.copy(f, new File(txmDir, f.getName()));
-	} else {
-		println "Won't process file "+f;
-	}
-}
-
-if (txmDir.listFiles() == null) {
-	println "No txm file to process"
-	return;
-}
-
-if (MONITOR != null) MONITOR.worked(1, "IMPORTER")
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-println "-- IMPORTER - Reading source files"
-def imp = new importer()
-if (!imp.run(srcDir, binDir, txmDir, basename, metadataXPath)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "ANNOTATE")
-println "-- ANNOTATE - Running NLP tools - $model model"
-boolean annotate_status = true;
-if (annotate && !(new Annotate().run(binDir, txmDir,model+".par"))) {
-	println "Skipping Annotate process";
-	annotate_status = false;
-}
-
-//if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-//if (MONITOR != null) MONITOR.worked(20, "ANNOTATE")
-//println "-- ANNOTATE - Running NLP tools - fr model"
-//annotate_status = true;
-//if (annotate && !(new Annotate().run(binDir, txmDir,"fr.par"))) {
-//	println "Skipping Annotate process";
-//	annotate_status = false;
-//}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println "-- COMPILING - Building Search Engine indexes"
-def c = new compiler();
-if (debug) c.setDebug();
-//c.setCwbPath("~/TXM/cwb/bin");
-c.setLang(lang);
-c.setAnnotationDone(annotate_status)
-if (!c.run(binDir, txmDir, corpusname, metadataXPath)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-
-	println "-- EDITION"
-	if (MONITOR != null) MONITOR.worked(25, "EDITION")
-	File outdir = new File(binDir,"/HTML/$corpusname/default/");
-	outdir.mkdirs();
-	files = c.getOrderedTxmFiles();
-
-	println("Building editions: "+files.size()+" files" );
-	for (File txmFile : files) {
-		print "."
-		String txtname = txmFile.getName();
-		int idx = txtname.lastIndexOf(".");
-		if(idx > 0) txtname = txtname.substring(0, idx);
-		List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-		List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);//["'","(","[","{","«"];
-
-		Element text = params.addText(corpusElem, txtname, txmFile);
-
-		def ed = new pager(txmFile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, corpusname, metadataXPath);
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < ed.getPageFiles().size();) {
-			File f = ed.getPageFiles().get(i);
-			String wordid = ed.getIdx().get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-}
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/docLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/docLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/docLoader.groovy	(revision 729)
@@ -1,360 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-//
-// The TXM platform 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 General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-//
-//
-//
-// $LastChangedDate: 2012-04-24 14:30:47 +0200 (mar., 24 avr. 2012) $
-// $LastChangedRevision: 2174 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.doc;
-
-import org.txm.importer.*;
-import javax.xml.stream.XMLStreamReader;
-import org.txm.importer.ApplyXsl2;
-import org.txm.importer.ValidateXml;
-import org.txm.importer.xml.importer;
-import org.txm.importer.xml.compiler;
-import org.txm.objects.*;
-import org.txm.tokenizer.TokenizerClasses;
-import org.txm.utils.*;
-import org.txm.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.utils.i18n.*;
-import org.txm.metadatas.*;
-import javax.xml.stream.*;
-import org.w3c.dom.Element;
-import org.txm.importer.DomUtils;
-import org.txm.sw.RemoveTag;
-import org.txm.doc.*;
-
-String userDir = System.getProperty("user.home");
-
-def MONITOR;
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/doc/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-		TokenizerClasses.loadFromNode(params.getTokenizerElement(params.getCorpusElement()));
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		//Toolbox.setParam(Toolbox.INSTALL_DIR,new File("C:\\Program Files\\TXM"));//For Windows
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		//Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File("C:\\Program Files\\treetagger"));//for Windows
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		//Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File("C:\\Program Files\\treetagger\\models"));//for Windows
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-int wordsPerPage = params.getWordsPerPage("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME), "corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir, "txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-String textSortAttribute = null; // a property in metadata.csv file
-String paginationElement = "pb";
-boolean normalizeMetadata = true;
-
-File allmetadatasfile = new File(srcDir, "metadata.csv");
-
-if (txmDir.listFiles() == null) {
-	println "No file to process"
-	return;
-}
-
-def srcfiles = [];
-for (File f : srcDir.listFiles()) {
-	String name = f.getName().toLowerCase();
-	if (name.endsWith(".properties")) continue;
-	if (name.equals("import.xml")) continue;
-	if (name.endsWith(".csv")) continue;
-	if (f.isDirectory()) continue;
-	if (f.isHidden()) continue;
-	if (name.endsWith(".doc") || name.endsWith(".docx") || name.endsWith(".odt") || name.endsWith(".rtf")) {
-		srcfiles.add(f)
-	}
-}
-
-if (srcfiles.size() == null) {
-	println "No file to process"
-	return;
-}
-
-// convert to TEI
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "CREATING TEI FILES")
-println "-- CONVERTER - Converting source files"
-File xsldir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME), "xsl")
-if (!DocumentToTei.processFiles(srcfiles, txmDir, xsldir)) {
-	println "Abord import"
-	return;
-}
-println ""
-
-// move data folders and build css file
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "RETRIEVE STYLES")
-println "Retrieving data folders and style files"
-println txmDir.listFiles()
-File docfiles = new File(binDir, "docfiles");
-docfiles.mkdir()
-for (File infile : txmDir.listFiles()) {
-	if (infile.isDirectory()) {
-		File unzipDir = new File(docfiles, infile.getName())
-		infile.renameTo(unzipDir)
-
-		//println "zipdir "+unzipDir
-		StylesToCSS converter = new StylesToCSS(unzipDir);
-		if (!converter.process(new File(unzipDir, "style.css"))) {
-			println "WARNING: Failed to build css file of $unzipDir"
-		}
-		// and get the soft page breaks and styles parents
-		def parentStyles = converter.parentStyles;
-		def beforebreaks = converter.beforebreaks
-		def afterbreaks = converter.afterbreaks
-
-		//println "BEFORES: "+beforebreaks
-		//println "AFTERS: "+afterbreaks
-		//println "PARENTS: "+parentStyles
-
-		// se servir de ça pour insérer <pb/> et remplacer styles automatiques
-		File xmlFile = new File(txmDir, unzipDir.getName().substring(6))
-		//println "PATCH : $xmlFile"
-		new FixBreaksAndAutomaticStyles().run(xmlFile, beforebreaks, afterbreaks, parentStyles)
-	}
-}
-
-// set new Root
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FIXING TEI")
-println "Setting new XML root element"
-for (File infile : txmDir.listFiles()) {
-	if (infile.isHidden() || infile.isDirectory() || infile.getName().startsWith(".")) continue;
-	print "."
-	if (!SetNewXmlDocumentRoot.process(infile, "//tei:text")) {
-		println "Failed to reset XML root $infile"
-		return
-	}
-}
-println ""
-
-// filtering
-println "Filtering XML files with xpaths: [//tei:term]"
-def xpaths = params.getExcludeXpaths()
-if (xpaths == null) xpaths = ["//tei:term"]
-else xpaths << "//tei:term"
-
-if (xpaths != null) {
-	println "Filtering XML files with xpaths: $xpaths"
-	for (File infile : txmDir.listFiles()) {
-		if (infile.isHidden() || infile.isDirectory() || infile.getName().startsWith(".")) continue;
-		print "."
-		if (!RemoveTag.xpath(infile, xpaths)) {
-			println "Failed to filter $infile"
-			return
-		}
-	}
-	println ""
-}
-
-//get metadata values from CSV
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "READ METADATA")
-Metadatas metadatas; // text metadata
-//println "Trying to read metadata from: "+allmetadatasfile
-if (allmetadatasfile.exists()) {
-	File copy = new File(binDir, "metadata.csv")
-	if (!FileCopy.copy(allmetadatasfile, copy)) {
-		println "Error: could not create a copy of the metadata.csv file "+allmetadatasfile.getAbsoluteFile();
-		return;
-	}
-	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
-} else {
-	println "no $allmetadatasfile metadata file found."
-}
-
-for (File infile : txmDir.listFiles()) {
-	if (infile.isHidden()) infile.delete();
-	if (infile.getName().startsWith(".")) infile.delete();
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(5, "IMPORTER")
-println "-- IMPORTER - Reading source files"
-def imp = new importer();
-imp.doValidation(true) // change this to not validate xml
-imp.doTokenize(true) // change this, to not tokenize xml
-if (!imp.run(srcDir, binDir, txmDir, basename, "", lang)) {
-	println "import process stopped";
-	return;
-}
-
-if (metadatas != null) {
-	if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-	if (MONITOR != null) MONITOR.worked(20, "INJECTING METADATA")
-	println "-- INJECTING METADATA - from csv file: "+allmetadatasfile
-	
-	println("Injecting metadata: "+metadatas.getHeadersList()+" in texts of directory "+new File(binDir,"txm"))
-	for (File infile : txmDir.listFiles()) {
-		if (infile.isHidden() || infile.isDirectory() || infile.getName().startsWith(".")) continue;
-		print "."
-
-		File outfile = File.createTempFile("temp", ".xml", infile.getParentFile());
-		if (!metadatas.injectMetadatasInXml(infile, outfile, "text", null)) {
-			outfile.delete();
-		} else {
-			if (!(infile.delete() && outfile.renameTo(infile))) println "Warning can't rename file "+outfile+" to "+infile
-			if (!infile.exists()) {
-				println "Error: could not replace $infile by $outfile"
-				return false;
-			}
-		}
-	}
-	println ""
-}
-
-List<File> files = txmDir.listFiles()
-if (files == null || files.size() == 0) {
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "ANNOTATE")
-println "-- ANNOTATE - Running NLP tools"
-boolean annotationSuccess = false;
-if (annotate && new Annotate().run(binDir, txmDir, model+".par")) {
-	annotationSuccess = true;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println "-- COMPILING - Building Search Engine indexes"
-def c = new compiler();
-if(debug) c.setDebug();
-//c.setCwbPath("~/TXM/cwb/bin");
-c.setOptions(textSortAttribute, normalizeMetadata);
-c.setAnnotationSuccess(annotationSuccess)
-c.setLang(lang);
-if (!c.run(binDir, txmDir, corpusname, null, srcfiles, metadatas)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-
-	println "-- EDITION - Building edition"
-	if (MONITOR != null) MONITOR.worked(25, "EDITION")
-
-	File outdir = new File(binDir,"/HTML/$corpusname/default/");
-	outdir.mkdirs();
-	List<File> filelist = txmDir.listFiles();
-	Collections.sort(filelist);
-	def second = 0
-
-	println "Paginating texts: "
-
-	for (File txmFile : filelist) {
-		if (txmFile.isHidden() || txmFile.isDirectory() || txmFile.getName().startsWith(".")) continue;
-		print "."
-
-		String txtname = txmFile.getName();
-		int i = txtname.lastIndexOf(".");
-		if(i > 0) txtname = txtname.substring(0, i);
-
-		List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-		List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-		Element text = params.addText(corpusElem, txtname, txmFile);
-
-		def ed = new pager(txmFile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, "pb");
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < ed.getPageFiles().size();) {
-			File f = ed.getPageFiles().get(i);
-			String wordid = ed.getIdx().get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-
-	for (File unzipDir : docfiles.listFiles()) {
-		File css = new File(unzipDir, "style.css")
-		String textname = unzipDir.getName();
-		textname = textname.substring(6, textname.lastIndexOf(".")) // remove "files-" and ".xml"
-		File newcss = new File(outdir, textname+".css")
-		css.renameTo(newcss)
-	}
-	File doc = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME), "css/doc.css")
-	doc_copy = new File(outdir, "doc.css")
-	FileCopy.copy(doc, doc_copy);
-
-
-	// copy images : images externaly linked must be added manually in the html/CORPUS/default directory
-	println "Copying internal images..."
-	for (File txmFile : filelist) {
-		if (txmFile.isHidden() || txmFile.isDirectory() || txmFile.getName().startsWith(".")) continue;
-		print "."
-		File picturesDirectory = new File(binDir, "docfiles/files-"+txmFile.getName()+"/Pictures")
-		println picturesDirectory
-		if (picturesDirectory.exists()) {
-			File picturesDirectory_copy = new File(outdir, "Pictures")
-			FileCopy.copyFiles(picturesDirectory, picturesDirectory_copy)
-			if (!picturesDirectory_copy.exists()) {
-				println "Failed to copy $picturesDirectory to $picturesDirectory_copy"
-			}
-		}
-	}
-	println ""
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/tmxLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/tmxLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/tmxLoader.groovy	(revision 729)
@@ -1,194 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-//
-// The TXM platform 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 General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-//
-//
-//
-// $LastChangedDate: 2015-08-31 13:45:22 +0200 (lun., 31 août 2015) $
-// $LastChangedRevision: 3028 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.tmx;
-import org.txm.searchengine.cqp.corpus.MainCorpus;
-
-import java.io.File;
-import org.txm.importer.tmx.importer;
-import org.txm.importer.tmx.compiler;
-import org.txm.importer.tmx.pager;
-import org.txm.objects.*;
-import org.txm.utils.*;
-import org.txm.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.utils.i18n.*;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-
-String userDir = System.getProperty("user.home");
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-def MONITOR;
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/tmx/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang;
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);;
-int wordsPerPage = params.getWordsPerPage("default")
-String page_element = params.getPageElement("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir, "txm");
-txmDir.deleteDir();
-txmDir.mkdirs();
-HashMap<String, String> textLangs = [:];
-def langGroups = [:];
-
-println "-- IMPORTER - Reading source files"
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "IMPORTER - Reading source files");
-def imp = new importer()
-imp.run(srcDir, binDir, txmDir, textLangs, langGroups);
-def corpusIDS = imp.getCorpusIDS()
-println "-- ANNOTATE - Running NLP tools"
-if (MONITOR != null) MONITOR.worked(20, "ANNOTATE - Running NLP tools");
-new Annotate().run(binDir, txmDir, textLangs);
-
-println "langs : "+textLangs
-println "texts : "+langGroups
-
-println "-- COMPILING - Building Search Engine indexes"
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "COMPILING - Building Search Engine indexes")
-def c = new compiler();
-if (debug) c.setDebug();
-c.setAlignment("seg","id");
-c.setLangs(textLangs);
-c.setCorpusIDS(corpusIDS);
-c.setLangGroups(langGroups);
-if (!c.run(binDir, txmDir, basename)) {
-	println "Compiler failed"
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-new File(binDir,"HTML").deleteDir();
-new File(binDir,"HTML").mkdirs();
-if (build_edition) {
-	
-	println "-- EDITION - Building edition"
-	if (MONITOR != null) MONITOR.worked(20, "EDITION - Building edition")
-	
-	List<File> filelist = new File(binDir,"txm").listFiles();
-	def second = 0
-
-	def splitTUsPerText = [:]
-
-	for (File txmCorpusDir : txmDir.listFiles()) {
-		def txmFiles = txmCorpusDir.listFiles();
-		txmFiles.sort() // same order
-		//println "paging txmFiles : "+txmFiles
-
-		File outdir = new File(binDir,"/HTML/"+txmCorpusDir.getName()+"/default/");
-		outdir.mkdirs();
-		//println "processing pages of corpus "+txmCorpusDir.getName()
-
-		Element paraCorpusElem = corpusElem.cloneNode(true);
-		paraCorpusElem.setAttribute("name", txmCorpusDir.getName());
-
-		for (File srcfile : txmFiles) {
-			print "."
-			String txtname = srcfile.getName();
-			int i = txtname.lastIndexOf("_");
-			if(i > 0) txtname = txtname.substring(0, i);
-
-			//println ""+srcfile.getName()+" -> "+splitTUsPerText[txtname]
-			def splitTUs = splitTUsPerText[txtname];
-			if (splitTUs == null) {
-				splitTUs = [];
-				splitTUsPerText[txtname] = splitTUs;
-			}
-
-			String l = textLangs.get(srcfile.getName())
-			if (l == null) l = "fr";
-			List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(l);
-			List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(l);
-
-			Element text = params.addText(paraCorpusElem, txtname, srcfile);
-
-			def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, page_element,splitTUs);
-			Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-			for (i = 0 ; i < ed.getPageFiles().size();) {
-				File f = ed.getPageFiles().get(i);
-				String wordid = ed.getIdx().get(i);
-				params.addPage(edition, ""+(++i), wordid);
-			}
-		}
-
-		params.corporaElement.appendChild(paraCorpusElem);
-
-		File cssfile = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME), "css/tmx.css")
-		if (cssfile.exists()) {
-			FileCopy.copy(cssfile, new File(outdir, "tmx.css"));
-		}
-		File stylefile = new File(binDir, "style.css")
-		if (stylefile.exists()) {
-			FileCopy.copy(stylefile, new File(outdir, "style.css"));
-		}
-		println ""
-	}
-}
-params.corporaElement.removeChild(corpusElem);
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/xmltxmLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/xmltxmLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/xmltxmLoader.groovy	(revision 729)
@@ -1,239 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-//
-// The TXM platform 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 General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-//
-// $LastChangedDate: 2016-05-11 08:38:47 +0200 (mer., 11 mai 2016) $
-// $LastChangedRevision: 3211 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.xmltxm
-
-import javax.xml.stream.*;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintStream;
-import java.net.URL;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-
-import java.io.File;
-import org.txm.importer.*;
-import org.txm.importer.xmltxm.compiler;
-import org.txm.importer.xml.pager;
-import org.txm.objects.*;
-import org.txm.utils.*;
-import org.txm.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.metadatas.*;
-import org.txm.utils.i18n.*;
-import org.w3c.dom.Element;
-
-String userDir = System.getProperty("user.home");
-boolean debug = false
-def MONITOR;
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/anapovoas/FOLLOWING TEST OF MATTHIEU/OUTPUT 2/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-String page_element = params.getPageElement("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir,"txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-File allmetadatasfile = new File(srcDir, "metadata.csv");
-
-// Apply XSL
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(1, "APPLYING XSL")
-if (xsl != null && xslParams != null && xsl.trim().length() > 0) {
-	if (ApplyXsl2.processImportSources(new File(xsl), srcDir, new File(binDir, "src"), xslParams))
-	// return; // error during process
-	srcDir = new File(binDir, "src");
-	println ""
-}
-
-// copy txm files
-println "Copying XML-TXM files..."
-List<File> srcfiles = srcDir.listFiles();
-for (File f : srcfiles) {// check XML format, and copy file into binDir
-	if (f.isHidden() || f.getName().equals("import.xml") || f.getName().equals("metadata.csv") || f.getName().endsWith(".properties"))
-		continue;
-	if (ValidateXml.test(f)) {
-		FileCopy.copy(f, new File(txmDir, f.getName()));
-	} else {
-		println "Won't process file "+f;
-	}
-}
-
-def files = txmDir.listFiles();
-if (files == null || files.size() == 0) {
-	println "No txm file to process"
-	return;
-}
-
-////get metadata values from CSV
-//Metadatas metadatas; // text metadata
-//if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-//if (allmetadatasfile.exists()) {
-//	println "Trying to read metadata from: "+allmetadatasfile
-//	File copy = new File(binDir, "metadata.csv")
-//	if (!FileCopy.copy(allmetadatasfile, copy)) {
-//		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
-//		return;
-//	}
-//	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
-//} else {
-//	println "no metadata file: "+allmetadatasfile
-//}
-//
-//if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-//if (MONITOR != null) MONITOR.worked(20, "INJECTING METADATA - from csv file: "+allmetadatasfile)
-//if (metadatas != null) {
-//	println("Injecting metadata: "+metadatas.getHeadersList()+" in texts of directory "+txmDir)
-//	for (File infile : files) {
-//		print "."
-//		File outfile = File.createTempFile("temp", ".xml", infile.getParentFile());
-//
-//		if (!metadatas.injectMetadatasInXml(infile, outfile, "text", null)) {
-//			outfile.delete();
-//		} else {
-//			if (!(infile.delete() && outfile.renameTo(infile))) println "Warning can't rename file "+outfile+" to "+infile
-//			if (!infile.exists()) {
-//				println "Error: could not replace $infile by $outfile"
-//				return false;
-//			}
-//		}
-//	}
-//	println ""
-//}
-
-//sorting files per metadata "date" with format
-def dates = [:]
-def useDates = false
-SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd.MM.yyyy");
-for (File infile : files) { // get dates
-	String str = GetAttributeValue.process(infile, "/TEI/text", "date")
-
-	if (str != "N/A") {
-		dates[infile] = simpleDateFormat.parse(str)
-		useDates = true
-	}
-}
-
-//sort
-if (useDates) {
-	files.sort() { f-> dates[f] }
-} else {
-	files.sort()
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println "-- COMPILING - Building Search Engine indexes"
-def c = new compiler();
-if (debug) c.setDebug();
-c.setLang(lang);
-if (!c.run(binDir, txmDir, basename, corpusname, Arrays.asList(files))) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-
-	if (MONITOR != null) MONITOR.worked(20, "EDITION")
-	println "-- EDITION - Building edition"
-	
-	File outdir = new File(binDir,"/HTML/$corpusname/default/");
-	outdir.mkdirs();
-
-	def second = 0
-
-	println "Paginating text: "
-	for (File srcfile : files) {
-
-		String txtname = srcfile.getName();
-		int i = txtname.lastIndexOf(".");
-		if(i > 0) txtname = txtname.substring(0, i);
-
-		List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-		List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-		Element text = params.addText(params.corpora.get(corpusname), txtname, srcfile);
-
-		if (second) { print(", ") }
-		if (second > 0 && (second++ % 5) == 0) println ""
-		print(".");
-
-		def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, page_element);
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < ed.getPageFiles().size();) {
-			File f = ed.getPageFiles().get(i);
-			String wordid = ed.getIdx().get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-}
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/discoursLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/discoursLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/discoursLoader.groovy	(revision 729)
@@ -1,153 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-//
-// The TXM platform 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 General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-//
-//
-//
-// $LastChangedDate: 2014-11-20 11:30:43 +0100 (jeu., 20 nov. 2014) $
-// $LastChangedRevision: 2904 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.discours;
-
-import org.txm.importer.discours.compiler;
-import org.txm.importer.xml.pager;
-import org.txm.objects.*;
-import org.txm.utils.*;
-import org.txm.*;
-import org.txm.utils.i18n.*;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-
-String userDir = System.getProperty("user.home");
-
-def MONITOR;
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true;
-	params = new BaseParameters(new File(userDir, "xml/discours/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir,"txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-if (MONITOR != null) MONITOR.worked(1, "IMPORTER")
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-println "-- IMPORTER - Reading source files"
-def imp = new importer();
-if (!imp.run(srcDir, binDir, txmDir, encoding, basename)) {
-	println "import process stopped";
-	return;
-}
-
-println "-- ANNOTATE - Running NLP tools"
-println "No annotation to do"
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println("-- COMPILING - Building Search Engine indexes")
-List<File> files = txmDir.listFiles();
-def c = new compiler()
-if (debug) c.setDebug();
-// no annotation
-c.setLang(lang);
-if (!c.run(files, binDir, txmDir, corpusname)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-
-	println "-- EDITION - Building edition"
-	if (MONITOR != null) MONITOR.worked(20, "EDITION")
-	
-	File outdir = new File(binDir,"/HTML/$corpusname/default/");
-	outdir.mkdirs();
-	List<File> filelist = txmDir.listFiles();
-	Collections.sort(filelist);
-
-	println "Paginating texts: "
-
-	for (File srcfile : filelist) {
-		print "."
-		String txtname = srcfile.getName();
-		int i = txtname.lastIndexOf(".");
-		if(i > 0) txtname = txtname.substring(0, i);
-
-		List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-		List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-		Element text = params.addText(params.corpora.get(corpusname), txtname, srcfile);
-
-		def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, "pb");
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < ed.getPageFiles().size();) {
-			File f = ed.getPageFiles().get(i);
-			String wordid = ed.getIdx().get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-}
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/frantextLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/frantextLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/frantextLoader.groovy	(revision 729)
@@ -1,212 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-//
-// This file is part of the TXM platform.
-//
-// The TXM platform is free software: you can redistribute it and/or modif y
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The TXM platform 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with the TXM platform.  If not, see <http://www.gnu.org/licenses/>.
-//
-//
-//
-//
-//
-// $LastChangedDate: 2012-02-13 11:42:24 +0100 (lun., 13 févr. 2012) $
-// $LastChangedRevision: 2126 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.frantext;
-
-import javax.xml.stream.XMLStreamReader;
-import org.txm.importer.ApplyXsl2;
-import org.txm.importer.bfm.importer;
-import org.txm.importer.bfm.compiler;
-import org.txm.importer.bfm.pager;
-import org.txm.objects.*;
-import org.txm.*;
-import org.txm.utils.i18n.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.importer.*;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-import org.txm.utils.*;
-
-String userDir = System.getProperty("user.home");
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-def MONITOR;
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/TESTS/frantext/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-		//rootDir = userDir+"/xml/TESTS/alceste";  // directory which contains the source file
-
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir,"txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-// BFM XPATH PARAMETERS
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(1, "READ XPATH PARAMETERS")
-File paramDeclarationFile = new File(srcDir, "import.properties");
-Properties metadataXPath = new Properties();
-if (paramDeclarationFile.exists() && paramDeclarationFile.canRead()) {
-	InputStreamReader input = new InputStreamReader(new FileInputStream(paramDeclarationFile) , "UTF-8");
-	metadataXPath.load(input);
-	input.close();
-
-	if (!metadataXPath.containsKey("titre"))
-		println "Warning: parameters property file does not contain the 'titre' metadata"
-	if (!metadataXPath.containsKey("forme"))
-		println "Warning: parameters property file does not contain the 'forme' metadata in param values. The default value is 'prose'"
-}
-else
-	println "No '$paramDeclarationFile' file found"
-
-// Apply XSL
-if (MONITOR != null) MONITOR.worked(5, "APPLYING XSL")
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-File xslFile = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME), "xsl/txm-filter-teifrantext-teibfm.xsl") // force xsl
-
-if (!ApplyXsl2.processImportSources(xslFile, srcDir, new File(binDir, "xsl"))) {
-	println "Error: failed to apply xsl $xsl. Aborting import."
-	return; // error durring process
-}
-srcDir = new File(binDir, "xsl");
-
-// copy txm files
-println "-- VALIDATION - checking XML source files well-formedness"
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-List<File> srcfiles = srcDir.listFiles();
-for (File f : srcfiles) { // check XML format, and copy file into binDir
-	if (f.isHidden() || f.getName().equals("import.xml") || f.getName().equals("metadata.csv") || f.getName().endsWith(".properties"))
-		continue;
-	if (ValidateXml.test(f)) {
-		FileCopy.copy(f, new File(txmDir, f.getName()));
-	} else {
-		println "Won't process file "+f;
-	}
-}
-if (MONITOR != null) MONITOR.worked(5)
-
-if (txmDir.listFiles() == null) {
-	println "No txm file to process"
-	return;
-}
-
-if (MONITOR != null) MONITOR.worked(1, "IMPORTER")
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-println "-- IMPORTER - Reading source files"
-def imp = new importer()
-if (!imp.run(srcDir, binDir, txmDir, basename, metadataXPath)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "ANNOTATE")
-println "-- ANNOTATE - Running NLP tools - $model model"
-boolean annotate_status = true;
-if (annotate && !(new Annotate().run(binDir, txmDir, model+".par"))) {
-	println "Skipping Annotate process";
-	annotate_status = false;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println "-- COMPILING - Building Search Engine indexes"
-def c = new compiler();
-if (debug) c.setDebug();
-//c.setCwbPath("~/TXM/cwb/bin");
-c.setLang(lang);
-c.setAnnotationDone(annotate_status)
-if (!c.run(binDir, txmDir, corpusname, metadataXPath)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-
-	println "-- EDITION"
-	if (MONITOR != null) MONITOR.worked(25, "EDITION")
-	
-	File outdir = new File(binDir,"/HTML/$corpusname/default/");
-	outdir.mkdirs();
-	files = c.getOrderedTxmFiles();
-	println("Building editions: "+files.size()+" files" );
-
-	for (File txmFile : files) {
-		print "."
-		String txtname = txmFile.getName();
-		int idx = txtname.lastIndexOf(".");
-		if(idx > 0) txtname = txtname.substring(0, idx);
-		List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-		List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);//["'","(","[","{","«"];
-
-		Element text = params.addText(corpusElem, txtname, txmFile);
-
-		def ed = new pager(txmFile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, corpusname, metadataXPath);
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < ed.getPageFiles().size();) {
-			File f = ed.getPageFiles().get(i);
-			String wordid = ed.getIdx().get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-}
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/factivaLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/factivaLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/factivaLoader.groovy	(revision 729)
@@ -1,288 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-//
-// The TXM platform 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 General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-//
-//
-//
-// $LastChangedDate: 2012-02-13 11:42:24 +0100 (lun., 13 févr. 2012) $
-// $LastChangedRevision: 2126 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.factiva;
-
-import javax.xml.stream.XMLStreamReader;
-import org.txm.importer.ApplyXsl2;
-import org.txm.importer.Factiva2XmlTxm;
-import org.txm.importer.ValidateXml;
-import org.txm.importer.xml.importer;
-import org.txm.importer.xml.compiler;
-import org.txm.importer.xml.pager;
-import org.txm.objects.*;
-import org.txm.utils.*;
-import org.txm.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.utils.i18n.*;
-import org.txm.metadatas.*;
-import javax.xml.stream.*;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-
-String userDir = System.getProperty("user.home");
-
-def MONITOR;
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true;
-	params = new BaseParameters(new File(userDir, "xml/TESTS/factiva/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-String page_element = params.getPageElement("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir,"txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-File propertyFile = new File(rootDir, "import.properties")//default
-Properties props = new Properties();
-String[] metadatasToKeep;
-
-String textSortAttribute = null;
-String paginationElement = null;
-boolean normalizeMetadata = false;
-String ignoredElements = null;
-boolean stopIfMalformed = false;
-
-println "Trying to read import properties file: "+propertyFile
-if (propertyFile.exists() && propertyFile.canRead()) {
-	InputStreamReader input = new InputStreamReader(new FileInputStream(propertyFile) , "UTF-8");
-	props.load(input);
-	input.close();
-	if(props.getProperty("sortmetadata") != null)
-		textSortAttribute = props.get("sortmetadata").toString();
-	if(props.getProperty("editionpage") != null)
-		paginationElement = props.get("editionpage").toString();
-	if(props.getProperty("normalizemetadata") != null)
-		normalizeMetadata = Boolean.parseBoolean(props.get("normalizemetadata").toString());
-	if(props.getProperty("ignoredelements") != null)
-		ignoredElements = props.get("ignoredelements").toString();
-	if(props.getProperty("stopIfMalformed") != null)
-		stopIfMalformed = Boolean.parseBoolean(props.get("stopIfMalformed").toString());
-
-	println "import properties: "
-	println " sort metadata: "+textSortAttribute
-	println " edition page tag: "+paginationElement
-	println " normalize attributes: "+normalizeMetadata
-	println " ignored elements: "+ignoredElements
-	println " stop if a XML source is malformed: "+stopIfMalformed
-}
-
-File allmetadatasfile = new File(srcDir, "metadata.csv");
-
-// Apply Factiva2XMLTXM
-println "Factiva -> xml/w"
-File factivaOutDir = new File(binDir, "src")
-new Factiva2XmlTxm().run(srcDir, factivaOutDir.getAbsolutePath());
-if (factivaOutDir.listFiles() == null) {
-	println "Error: no file to process"
-	return;
-}
-srcDir = factivaOutDir;
-
-// Apply XSL
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(1, "APPLYING XSL")
-if (xsl != null && xslParams != null && xsl.trim().length() > 0) {
-	if (ApplyXsl2.processImportSources(new File(xsl), srcDir, new File(binDir, "src"), xslParams))
-	// return; // error during process
-	srcDir = new File(binDir, "src");
-	println ""
-}
-
-// copy txm files
-List<File> srcfiles = srcDir.listFiles();
-for (int i = 0 ; i < srcfiles.size() ; i++) {// check XML format, and copy file into binDir
-	File f = srcfiles.get(i)
-	if (f.getName().equals("import.xml") || f.getName().equals("metadata.csv") || f.getName().endsWith(".properties")) {
-		srcfiles.remove(i);
-		i--;
-		continue;
-	}
-	if (ValidateXml.test(f)) {
-		FileCopy.copy(f, new File(txmDir, f.getName()));
-	} else {
-		println "Won't process file "+f;
-	}
-}
-
-if (txmDir.listFiles() == null) {
-	println "No txm file to process"
-	return;
-}
-
-//get metadata values from CSV
-Metadatas metadatas; // text metadata
-println "Trying to read metadata from: "+allmetadatasfile
-if (allmetadatasfile.exists()) {
-	File copy = new File(binDir, "metadata.csv")
-	if (!FileCopy.copy(allmetadatasfile, copy)) {
-		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
-		return;
-	}
-	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
-} else
-	println "no metadata file: "+allmetadatasfile
-
-if (MONITOR != null) MONITOR.worked(1, "IMPORTER")
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-println "-- IMPORTER - Reading source files"
-def imp = new importer();
-imp.doValidation(true) // change this to not validate xml
-imp.doTokenize(true) // change this, to not tokenize xml
-imp.setStopIfMalformed(stopIfMalformed);
-if (!imp.run( srcDir, binDir, txmDir, basename, null, lang)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null) MONITOR.worked(20, "INJECTING METADATA")
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-println "-- INJECTING METADATA - from csv file: "+allmetadatasfile
-if (metadatas != null) {
-	println("Injecting metadata: "+metadatas.getHeadersList()+" in texts of directory "+new File(binDir,"txm"))
-	for (File infile : txmDir.listFiles()) {
-		print "."
-		File outfile = File.createTempFile("temp", ".xml", infile.getParentFile());
-		if (!metadatas.injectMetadatasInXml(infile, outfile, "text", null)) {
-			outfile.delete();
-		} else {
-			if (!(infile.delete() && outfile.renameTo(infile))) println "Warning can't rename file "+outfile+" to "+infile
-			if (!infile.exists()) {
-				println "Error: could not replace $infile by $outfile"
-				return false;
-			}
-		}
-	}
-	println ""
-}
-
-List<File> files = txmDir.listFiles()
-if (files == null || files.size() == 0) {
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(10, "ANNOTATE")
-println "-- ANNOTATE - Running NLP tools"
-boolean annotationSuccess = false;
-if (annotate && new Annotate().run(binDir, txmDir, model+".par")) {
-	annotationSuccess = true;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println "-- COMPILING - Building Search Engine indexes"
-def c = new compiler();
-if(debug) c.setDebug();
-//c.setCwbPath("~/TXM/cwb/bin");
-c.setOptions(textSortAttribute, normalizeMetadata);
-c.setAnnotationSuccess(annotationSuccess)
-c.setLang(lang);
-if (!c.run(binDir, txmDir, corpusname, null, srcfiles, metadatas)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-
-	println "-- EDITION - Building edition"
-	if (MONITOR != null) MONITOR.worked(20, "EDITION")
-	
-	File outdir = new File(binDir,"/HTML/$corpusname/default/");
-	outdir.mkdirs();
-	List<File> filelist = txmDir.listFiles();
-	Collections.sort(filelist);
-	def second = 0
-
-	println "Paginating texts: "
-
-	for (File txmFile : filelist) {
-		print "."
-		String txtname = txmFile.getName();
-		int i = txtname.lastIndexOf(".");
-		if(i > 0) txtname = txtname.substring(0, i);
-
-		List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-		List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-		Element text = params.addText(corpusElem, txtname, txmFile);
-
-		def ed = new pager(txmFile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, page_element);
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < ed.getPageFiles().size();) {
-			File f = ed.getPageFiles().get(i);
-			String wordid = ed.getIdx().get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-}
-
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/wtcLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/wtcLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/wtcLoader.groovy	(revision 729)
@@ -1,151 +0,0 @@
-package org.txm.importer.wtc
-
-import org.txm.importer.cwb.BuildCwbEncodeArgs;
-import java.io.File;
-import java.util.ArrayList;
-
-import org.txm.objects.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.*;
-import org.txm.utils.i18n.*;
-import org.txm.metadatas.*;
-import org.txm.utils.FileCopy;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-
-String userDir = System.getProperty("user.home");
-
-def MONITOR;
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/wtc/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		//Toolbox.setParam(Toolbox.INSTALL_DIR,new File("C:\\Program Files\\TXM"));//For Windows
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		//Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File("C:\\Program Files\\treetagger"));//for Windows
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		//Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File("C:\\Program Files\\treetagger\\models"));//for Windows
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-// FAKE: will contains no XML-TXM files
-File txmDir = new File(binDir, "txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-// Will contains the edition files
-File htmlDir = new File(binDir, "HTML/$corpusname");
-htmlDir.deleteDir();
-htmlDir.mkdirs();
-
-// get the wtc file and the registry file
-File wtcFile;
-File registryFile;
-println "Looking for files to process..."
-for(File f : srcDir.listFiles()) {
-	if (f.isHidden()) continue;
-	if (f.isDirectory()) continue;
-	if (f.getName().endsWith(".wtc")) {
-		if (wtcFile == null) {
-			wtcFile = f;
-			println "Using WTC file : $wtcFile"
-		}
-	} else if (f.getName().endsWith(".xml")) {
-
-	} else if (!f.getName().contains(".")){ // its the registry file
-		if (registryFile == null) {
-			registryFile = f;
-			println "Using registry file : $f"
-		}
-	}
-}
-
-if (wtcFile == null) {
-	println "No WTC file in source directory: "+srcDir;
-	return false;
-}
-
-// get pAttributes an run cwb-encode + cwb-makeall
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println "-- COMPILING - Building Search Engine indexes"
-def c = new compiler(wtcFile, registryFile)
-c.setDebug(debug)
-if (!c.run(binDir, corpusname)) {
-	println "Import stopped"
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-	
-	println "-- EDITION - Building edition"
-	if (MONITOR != null) MONITOR.worked(20, "EDITION - Building edition")
-
-	File outdir = new File(binDir,"/HTML/$corpusname/default/");
-	outdir.mkdirs();
-
-	print "."
-
-	List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-	List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-	File binWtcFile = new File(binDir,"wtc/"+corpusname+".wtc");
-	def ed = new pager(binWtcFile, outdir, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, registryFile !=null, c.pAttributesList);
-	def allIndexes = ed.getIdx();
-	def allPages = ed.getPageFiles();
-	for (String txtname : ed.getTextNames()) {
-		def txtIndexes = allIndexes[txtname];
-		def txtPages = allPages[txtname];
-
-		Element text = params.addText(params.corpora.get(corpusname), txtname, wtcFile);
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < txtPages.size();) {
-			File f = txtPages.get(i);
-			String wordid = txtIndexes.get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-}
-println ""
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/transcriberLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/transcriberLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/transcriberLoader.groovy	(revision 729)
@@ -1,309 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-//
-// The TXM platform 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 General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-
-//
-// This file is part of the TXM platform.
-//
-// The TXM platform is free software: you can redistribute it and/or modif y
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// The TXM platform 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 General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with the TXM platform.  If not, see <http://www.gnu.org/licenses/>.
-//
-//
-//
-// $LastChangedDate:$
-// $LastChangedRevision:$
-// $LastChangedBy:$
-//
-package org.txm.importer.transcriber;
-
-import java.io.File;
-import org.txm.scripts.teitxm.*;
-import org.txm.*;
-import org.txm.objects.*;
-import org.txm.utils.i18n.*;
-import org.txm.utils.*;
-import org.txm.importer.*;
-import org.txm.metadatas.*;
-import org.txm.utils.FileCopy;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-
-//PARAMETERS
-boolean removeInterviewer = false;//if true the transcription of speakers (en1 and enq2) defined in metadatas file will be ignored
-boolean includeComments = false;
-boolean ignoreTranscriberMetadata = false;
-int csvHeaderNumber = 1;
-int maxlines = 200;
-
-String userDir = System.getProperty("user.home");
-
-def MONITOR;
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/anapovoas/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, "\t");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "");
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-String page_element = params.getPageElement("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir,"txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-//get metadata values from CSV
-Metadatas metadatas; // text metadata
-File allmetadatasfile = new File(srcDir, "metadata.csv");
-println "Trying to read metadatas values from: "+allmetadatasfile
-if (allmetadatasfile.exists()) {
-	File copy = new File(binDir, "metadata.csv")
-	if (!FileCopy.copy(allmetadatasfile, copy)) {
-		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
-		return;
-	}
-	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
-}
-else
-	println "no metadata file: "+allmetadatasfile
-
-File propertyFile = new File(srcDir, "import.properties")//default
-Properties props = new Properties();
-String[] metadatasToKeep;
-if (propertyFile.exists() && propertyFile.canRead()) {
-	FileInputStream input = new FileInputStream(propertyFile);
-	props.load(input);
-	input.close();
-
-	if (props.getProperty("removeInterviewer") != null)
-		removeInterviewer = Boolean.parseBoolean(props.get("removeInterviewer").toString());
-	if (props.getProperty("ignoreTranscriberMetadata") != null)
-		ignoreTranscriberMetadata = Boolean.parseBoolean(props.get("ignoreTranscriberMetadata").toString());
-	if (props.getProperty("metadataList") != null)
-		metadatasToKeep = props.get("metadataList").toString().split("|");
-	if (props.getProperty("csvHeaderNumber") != null)
-		csvHeaderNumber = props.get("csvHeaderNumber").toString().split("|");
-	//if (props.getProperty("includeComments") != null)
-	//	includeComments = props.get("includeComments").toString();
-
-	println "import properties: "
-	println " removeInterviewer: "+removeInterviewer
-	println " ignoreTranscriberMetadata: "+ignoreTranscriberMetadata
-	println " metadataToKeep: "+metadatasToKeep
-	println " ignored csvHeaderSize: "+csvHeaderNumber
-	//println " includeComments: "+includeComments
-}
-
-// Apply XSL
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(1, "XSL")
-if (xsl != null && xsl.trim().length() > 0) {
-	if (ApplyXsl2.processImportSources(new File(xsl), srcDir, new File(binDir, "src")))
-		srcDir = new File(binDir, "src");
-	println ""
-}
-
-try {
-	// select only trs files
-	String ext = "trs";
-	ArrayList<File> trsfiles = srcDir.listFiles(); //find all trs files
-	if (trsfiles  == null) {
-		println ("No files in "+srcDir.getAbsolutePath())
-		return false;
-	}
-	for (int i = 0 ; i < trsfiles.size() ; i++) {
-		File f = trsfiles.get(i);
-		if (!f.getName().endsWith(ext) || !f.canRead() || f.isHidden()) {
-			trsfiles.remove(i)
-			i--;
-		}
-	}
-
-	if (trsfiles.size() == 0) {
-		println ("No transcription file (*.trs) found in "+srcDir.getAbsolutePath()+". Aborting.")
-		return false;
-	}
-
-	if (MONITOR != null) MONITOR.worked(1, "IMPORTER")
-	if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-	println "-- IMPORTER"
-	def imp = new importer(trsfiles, binDir, txmDir, metadatas, lang) //put result in the txm folder of binDir
-	if (!imp.run()) {
-		println "Failed to prepare files - Aborting";
-		return;
-	}
-	if (MONITOR != null) MONITOR.worked(20)
-
-	println "-- Xml Validation"
-	if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-	for (File infile : txmDir.listFiles()) {
-		if (!ValidateXml.test(infile)) {
-			println "$infile : Validation failed";
-			infile.delete();
-		}
-	}
-
-	if (MONITOR != null) MONITOR.worked(5)
-	if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-	println "-- Remove interviewer: "+removeInterviewer
-	if (removeInterviewer) 	{
-		if (metadatas == null) {
-			println "Can't remove interviewer without a metadata.csv file defining who are the interviewers."
-		} else {
-			println "Removing some speakers in "+txmDir.listFiles().length+" file(s)"
-			for (File infile : txmDir.listFiles()) {
-				String filename = infile.getName();
-				int idx = filename.indexOf(".xml");
-				if (idx > 0)
-					filename = filename.substring(0, idx);
-
-				ArrayList<Pair<String, String>> metas = metadatas.get(filename)
-				//println "filename=$filename metas= $metas"
-				for (Pair p : metas) {
-					if (p.getFirst().startsWith("enq")) {
-						new RemoveSpeaker(infile, infile, p.getFirst())
-					}
-				}
-			}
-		}
-	}
-
-	if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-	if (MONITOR != null) MONITOR.worked(20, "ANNOTATE")
-	println "-- ANNOTATE - Running NLP tools"
-	boolean annotationSuccess = false;
-	if (annotate && new Annotate().run(binDir, txmDir, model+".par")) {
-		annotationSuccess = true;
-	}
-
-	if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-	if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-	println "--COMPILING - Building Search Engine indexes"
-	trsfiles = txmDir.listFiles();
-
-	def comp = new compiler()
-	if(debug) comp.setDebug();
-	comp.removeInterviewers(removeInterviewer);
-	comp.setIgnoreTranscriberMetadata(ignoreTranscriberMetadata);
-	comp.setAnnotationSucces(annotationSuccess)
-	if (!comp.run(trsfiles, corpusname, "default", binDir)) {
-		println "Failed to compile files";
-		return;
-	}
-	
-	if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-	
-	File htmlDir = new File(binDir,"HTML/$corpusname");
-	htmlDir.deleteDir()
-	htmlDir.mkdirs();
-	if (build_edition) {
-		
-		if (MONITOR != null) MONITOR.worked(20, "EDITION")
-		println "-- EDITION - Building editions"
-		
-		List<File> filelist = txmDir.listFiles();
-		Collections.sort(filelist);
-		def second = 0
-
-		println "Paginating texts: "
-		for (File txmFile : filelist) {
-			print "."
-			String txtname = txmFile.getName();
-			int i = txtname.lastIndexOf(".");
-			if(i > 0) txtname = txtname.substring(0, i);
-
-			List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-			List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-			Element text = params.addText(corpusElem, txtname, txmFile);
-
-			def ed = new pager(txmFile, htmlDir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, page_element, metadatas);
-			Element edition = params.addEdition(text, "default", htmlDir.getAbsolutePath(), "html");
-
-			for (i = 0 ; i < ed.getPageFiles().size();) {
-				File f = ed.getPageFiles().get(i);
-				String wordid = ed.getIdx().get(i);
-				params.addPage(edition, ""+(++i), wordid);
-			}
-
-			if (ed.getPageFiles().size() > 0) {
-				Element editionBD = params.addEdition(text, "onepage", htmlDir.getAbsolutePath(), "html");
-				params.addPage(editionBD, "1", ed.getIndexes().get(0));
-			}
-		}
-
-		//copy transcriber.css
-		File cssfile = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME), "css/transcriber.css")
-		if (cssfile.exists() && htmlDir.exists()) {
-			FileCopy.copy(cssfile, new File(htmlDir, "transcriber.css"));
-			FileCopy.copy(cssfile, new File(htmlDir, "onepage/transcriber.css"));
-			FileCopy.copy(cssfile, new File(htmlDir, "default/transcriber.css"));
-		}
-	}
-}
-catch (Exception e){org.txm.utils.logger.Log.printStackTrace(e);}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/txtLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/txtLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/txtLoader.groovy	(revision 729)
@@ -1,198 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-//
-// The TXM platform 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 General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-//
-//
-//
-// $LastChangedDate: 2017-04-11 15:30:35 +0200 (mar., 11 avr. 2017) $
-// $LastChangedRevision: 3426 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.txt;
-
-import org.txm.importer.txt.importer;
-import org.txm.importer.txt.compiler;
-import org.txm.importer.xml.pager;
-import org.txm.objects.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.*;
-import org.txm.utils.i18n.*;
-import org.txm.metadatas.*;
-import org.txm.utils.FileCopy;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-
-String userDir = System.getProperty("user.home");
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-def MONITOR;
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "TXM/clipboard/clipboard2/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("C:/Program Files/TXM"));
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH, new File("C:/Program Files/TreeTagger"));
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH, new File("C:/Users/mdecorde/TXM/treetagger"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(userDir, "TXM"));
-	}
-}
-if (params == null) { println "No parameters file. Aborting"; return;}
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME), "corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir, "txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-//get metadata values from CSV
-Metadatas metadatas; // text metadata
-File allmetadatasfile = new File(srcDir, "metadata.csv");
-
-if (allmetadatasfile.exists()) {
-	println "Trying to read metadata from: "+allmetadatasfile
-	File copy = new File(binDir, "metadata.csv")
-	if (!FileCopy.copy(allmetadatasfile, copy)) {
-		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
-		return;
-	}
-	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
-} else {
-	println "No metadata file: "+allmetadatasfile
-}
-
-def suffixes = ["txt", "TXT"]
-println "-- IMPORTER - Reading source files with extension "+suffixes
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "IMPORTER - Reading source files with extension "+suffixes)
-if (!new importer().run(srcDir, binDir, txmDir,encoding, suffixes, basename, lang)) {
-	println "Import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "INJECTING METADATA - from csv file: "+allmetadatasfile)
-if (metadatas != null) {
-	println "-- INJECTING METADATA - from csv file: "+allmetadatasfile
-	println("Injecting metadata: "+metadatas.getHeadersList()+" in texts of directory "+txmDir)
-	for (File infile : txmDir.listFiles()) {
-		print "."
-		File outfile = File.createTempFile("temp", ".xml", infile.getParentFile());
-
-		if (!metadatas.injectMetadatasInXml(infile, outfile, "text", null)) {
-			outfile.delete();
-		} else {
-			if (!(infile.delete() && outfile.renameTo(infile))) println "Warning can't rename file "+outfile+" to "+infile
-			if (!infile.exists()) {
-				println "Error: could not replace $infile by $outfile"
-				return false;
-			}
-		}
-	}
-	println ""
-}
-
-println "-- ANNOTATE - Running NLP tools"
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "ANNOTATE - Running NLP tools")
-boolean annotationSuccess = true;
-if (annotate && !new Annotate().run(binDir, txmDir, model+".par")) {
-	annotationSuccess = false;
-}
-
-println "-- COMPILING - Building Search Engine indexes"
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "COMPILING - Building Search Engine indexes")
-def c = new compiler(null, "", corpusname, "default");
-//c.setCwbPath(userDir+"/TXM/cwb/bin/")// for developers
-if (metadatas != null)
-	c.setMetadataAttributes(metadatas.getSattributes())
-c.setLang(lang);
-c.setAnnotationSuccess(annotationSuccess)
-if (debug) c.setDebug();
-if (!c.run(binDir, txmDir, corpusname)) {
-	println "Import process stopped";
-	return;
-}
-//println "basename :"+basename;
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-
-	println "-- EDITION - Building edition"
-	if (MONITOR != null) MONITOR.worked(20, "EDITION - Building edition")
-	
-	File outdir = new File(binDir, "HTML/$corpusname/default/");
-	outdir.mkdirs();
-	List<File> filelist = txmDir.listFiles();
-	Collections.sort(filelist);
-	def second = 0
-
-
-	for (File srcfile : filelist) {
-		print "."
-		String txtname = srcfile.getName();
-		int i = txtname.lastIndexOf(".");
-		if (i > 0) txtname = txtname.substring(0, i);
-
-		List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-		List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-		Element text = params.addText(params.corpora.get(corpusname), txtname, srcfile);
-
-		def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, null);
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < ed.getPageFiles().size();) {
-			File f = ed.getPageFiles().get(i);
-			String wordid = ed.getIdx().get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-}
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/alcesteLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/alcesteLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/alcesteLoader.groovy	(revision 729)
@@ -1,161 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-//
-// The TXM platform 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 General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-//
-//
-//
-// $LastChangedDate: 2015-06-03 15:04:53 +0200 (mer., 03 juin 2015) $
-// $LastChangedRevision: 2984 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.alceste;
-
-import org.txm.importer.alceste.importer;
-import org.txm.importer.alceste.compiler;
-import org.txm.importer.xml.pager_old;
-import org.txm.objects.*;
-import org.txm.utils.*;
-import org.txm.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.utils.i18n.*;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-
-String userDir = System.getProperty("user.home");
-
-def MONITOR;
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/TESTS/alceste2/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir,"txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-if (MONITOR != null) MONITOR.worked(1, "IMPORTER")
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-println "-- IMPORTER - Reading source files"
-
-if (!(new importer().run(srcDir, binDir, txmDir, encoding, basename, lang))) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "ANNOTATE")
-println "-- ANNOTATE - Running NLP tools"
-boolean annotationSuccess = false;
-if (annotate && new Annotate().run(binDir, txmDir, model+".par")) {
-	annotationSuccess = true;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println "-- COMPILING - Building Search Engine indexes"
-def c = new compiler();
-c.setAnnotationSuccess(annotationSuccess)
-if (debug) c.setDebug();
-c.setLang(lang);
-if (!c.run(binDir, txmDir, corpusname)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-	
-	if (MONITOR != null) MONITOR.worked(20, "EDITION")
-
-	println "-- EDITION - Building edition"
-	File outdir = new File(binDir,"/HTML/$corpusname/default/");
-	outdir.mkdirs();
-	List<File> filelist = txmDir.listFiles();
-	Collections.sort(filelist);
-	def second = 0
-
-	println "Paginating texts: "
-
-	for (File srcfile : filelist) {
-		print "."
-		String txtname = srcfile.getName();
-		int i = txtname.lastIndexOf(".");
-		if(i > 0) txtname = txtname.substring(0, i);
-
-		List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-		List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-		Element text = params.addText(params.corpora.get(corpusname), txtname, srcfile);
-
-		def ed = new pager_old(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, "pb");
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < ed.getPageFiles().size();) {
-			File f = ed.getPageFiles().get(i);
-			String wordid = ed.getIdx().get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/factivamailLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/factivamailLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/factivamailLoader.groovy	(revision 729)
@@ -1,159 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-// 
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-// 
-// The TXM platform 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 General Public License for more
-// details.
-// 
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-//
-//
-//
-// $LastChangedDate: 2012-07-20 17:33:42 +0200 (ven., 20 juil. 2012) $
-// $LastChangedRevision: 2221 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.factiva;
-
-import org.txm.importer.alceste.importer;
-import org.txm.importer.alceste.compiler;
-import org.txm.importer.xml.pager_old;
-import org.txm.objects.*;
-import org.txm.utils.*;
-import org.txm.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.utils.i18n.*;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-
-String userDir = System.getProperty("user.home");
-
-def MONITOR;
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception) {
-	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/factivatxt/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir,"txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-// TRANSFORM FACTIVA TO ALCESTE HERE
-File newSrcDir = new File(binDir, "src")
-newSrcDir.mkdir();
-File alcesteFile = new File(newSrcDir, srcDir.getName()+".txt");
-FactivaMail2Alceste converter = new FactivaMail2Alceste(srcDir, alcesteFile, "UTF-8", "UTF-8")
-if (!converter.doparse()) {
-	println "Failed to convert files in $srcDir to one Alceste file"
-	return false;
-}
-if (MONITOR != null) MONITOR.worked(1, "IMPORTER")
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-println "-- IMPORTER - Reading source files"
-
-if (!(new importer().run(newSrcDir, binDir, txmDir, encoding, basename, lang))) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null) MONITOR.worked(20, "ANNOTATE")
-println "-- ANNOTATE - Running NLP tools"
-boolean annotationSuccess = false;
-if (annotate && new Annotate().run(binDir, txmDir, model+".par")) {
-	annotationSuccess = true;
-}
-
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println "-- COMPILING - Building Search Engine indexes"
-def c = new compiler();
-c.setAnnotationSuccess(annotationSuccess)
-if (debug) c.setDebug();
-c.setLang(lang);
-if (!c.run(binDir, txmDir, corpusname)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null) MONITOR.worked(20, "EDITION")
-println "-- EDITION - Building edition"
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-File outdir = new File(binDir,"/HTML/$corpusname/default/");
-outdir.mkdirs();
-List<File> filelist = txmDir.listFiles();
-Collections.sort(filelist);
-def second = 0
-
-println "Paginating texts: "
-for (File srcfile : filelist) {
-	print "."
-	String txtname = srcfile.getName();
-	int i = txtname.lastIndexOf(".");
-	if(i > 0) txtname = txtname.substring(0, i);
-	
-	List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-	List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-	Element text = params.addText(params.corpora.get(corpusname), txtname, srcfile);
-		
-	def ed = new pager_old(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, 500, basename, "pb");
-	Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-	
-	for (i = 0 ; i < ed.getPageFiles().size();) {
-		File f = ed.getPageFiles().get(i);
-		String wordid = ed.getIdx().get(i);
-		params.addPage(edition, ""+(++i), wordid);
-	}
-}
-
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/xmlLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/xmlLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/xmlLoader.groovy	(revision 729)
@@ -1,300 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-//
-// The TXM platform 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 General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-//
-//
-//
-// $LastChangedDate: 2016-11-29 16:47:07 +0100 (mar., 29 nov. 2016) $
-// $LastChangedRevision: 3349 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.xml;
-
-import javax.xml.stream.XMLStreamReader;
-
-import org.txm.sw.RemoveTag;
-import org.txm.importer.ApplyXsl2;
-import org.txm.importer.ValidateXml;
-import org.txm.importer.xml.importer;
-import org.txm.importer.xml.compiler;
-import org.txm.importer.xml.pager_old;
-import org.txm.objects.*;
-import org.txm.tokenizer.TokenizerClasses;
-import org.txm.utils.*;
-import org.txm.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.utils.i18n.*;
-import org.txm.metadatas.*;
-import javax.xml.stream.*;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-
-String userDir = System.getProperty("user.home");
-
-def MONITOR;
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/bvh/bugnames/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-
-		TokenizerClasses.loadFromNode(params.getTokenizerElement(params.getCorpusElement()));
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		//Toolbox.setParam(Toolbox.INSTALL_DIR,new File("C:\\Program Files\\TXM"));//For Windows
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		//Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File("C:\\Program Files\\treetagger"));//for Windows
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		//Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File("C:\\Program Files\\treetagger\\models"));//for Windows
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-String page_element = params.getPageElement("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME), "corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir, "txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-File propertyFile = new File(rootDir, "import.properties")//default
-Properties props = new Properties();
-String[] metadatasToKeep;
-
-String textSortAttribute = null;
-boolean normalizeMetadata = false;
-String ignoredElements = null;
-boolean stopIfMalformed = false;
-
-println "Trying to read import properties file: "+propertyFile
-if (propertyFile.exists() && propertyFile.canRead()) {
-	InputStreamReader input = new InputStreamReader(new FileInputStream(propertyFile) , "UTF-8");
-	props.load(input);
-	input.close();
-	if(props.getProperty("sortmetadata") != null)
-		textSortAttribute = props.get("sortmetadata").toString();
-	if (props.getProperty("normalizemetadata") != null)
-		normalizeMetadata = Boolean.parseBoolean(props.get("normalizemetadata").toString());
-	if (props.getProperty("ignoredelements") != null)
-		ignoredElements = props.get("ignoredelements").toString();
-	if (props.getProperty("stopifmalformed") != null)
-		stopIfMalformed = Boolean.parseBoolean(props.get("stopifmalformed").toString());
-
-	println "import properties: "
-	println " sort metadata: "+textSortAttribute
-	println " normalize attributes: "+normalizeMetadata
-	println " ignored elements: "+ignoredElements
-	println " stop if a XML source is malformed: "+stopIfMalformed
-}
-
-File allmetadatasfile = new File(srcDir, "metadata.csv");
-
-// Apply XSL
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(1, "APPLYING XSL")
-if (xsl != null && xslParams != null && xsl.trim().length() > 0) {
-	if (ApplyXsl2.processImportSources(new File(xsl), srcDir, new File(binDir, "src"), xslParams))
-	// return; // error during process
-	srcDir = new File(binDir, "src");
-	println ""
-}
-
-// copy xml+dtd files
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-List<File> srcfiles = srcDir.listFiles();
-if (srcfiles != null)
-	for (int i = 0 ; i < srcfiles.size() ; i++) {// check XML format, and copy file into binDir
-		File f = srcfiles.get(i)
-		if (f.getName().equals("import.xml") || f.getName().equals("metadata.csv") || f.getName().endsWith(".properties")) {
-			srcfiles.remove(i);
-			i--;
-			continue;
-		}
-		if (ValidateXml.test(f)) {
-			FileCopy.copy(f, new File(txmDir, f.getName()));
-		} else {
-			println "Won't process file "+f;
-		}
-	}
-
-if (txmDir.listFiles() == null) {
-	println "No txm file to process"
-	return;
-}
-
-// filtering
-/*def xpaths = params.getExcludeXpaths()
- if (xpaths != null) {
- println "Filtering XML files with xpaths: $xpaths"
- for (File infile : txmDir.listFiles()) {
- print "."
- if (!RemoveTag.xpath(infile, xpaths)) {
- println "Failed to filter $infile"
- return
- }
- }
- println ""
- }*/
-
-//get metadata values from CSV
-Metadatas metadatas; // text metadata
-
-println "Trying to read metadata from: "+allmetadatasfile
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (allmetadatasfile.exists()) {
-	println " Metadata file found: "+allmetadatasfile
-	File copy = new File(binDir, "metadata.csv")
-	if (!FileCopy.copy(allmetadatasfile, copy)) {
-		println "Error: could not create a copy of metadata file "+allmetadatasfile.getAbsoluteFile();
-		return;
-	}
-	metadatas = new Metadatas(copy, Toolbox.getParam(Toolbox.METADATA_ENCODING), Toolbox.getParam(Toolbox.METADATA_COLSEPARATOR), Toolbox.getParam(Toolbox.METADATA_TXTSEPARATOR), 1)
-} else {
-	println " No metadata file: "+allmetadatasfile
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(5, "IMPORTER")
-println "-- IMPORTER - Reading source files"
-def imp = new importer();
-imp.doValidation(true) // change this to not validate xml
-boolean skipDoTokenizeStep = params.getSkipTokenization()
-imp.doTokenize(!skipDoTokenizeStep) // change this, to not tokenize xml
-imp.setStopIfMalformed(stopIfMalformed);
-if (!imp.run( srcDir, binDir, txmDir, basename, ignoredElements, lang)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "INJECTING METADATA")
-if (metadatas != null) {
-	println("-- INJECTING METADATA - "+metadatas.getHeadersList()+" in texts of directory "+new File(binDir,"txm"))
-	for (File infile : txmDir.listFiles()) {
-		print "."
-		File outfile = File.createTempFile("temp", ".xml", infile.getParentFile());
-		if (!metadatas.injectMetadatasInXml(infile, outfile, "text", null)) {
-			outfile.delete();
-		} else {
-			if (!(infile.delete() && outfile.renameTo(infile))) println "Warning can't rename file "+outfile+" to "+infile
-			if (!infile.exists()) {
-				println "Error: could not replace $infile by $outfile"
-				return false;
-			}
-		}
-	}
-	println ""
-}
-List<File> files = txmDir.listFiles()
-if (files == null || files.size() == 0) {
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "ANNOTATE")
-println "-- ANNOTATE - Running NLP tools"
-boolean annotationSuccess = false;
-if (annotate && new Annotate().run(binDir, txmDir, model+".par")) {
-	annotationSuccess = true;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println "-- COMPILING - Building Search Engine indexes"
-def c = new compiler();
-if(debug) c.setDebug();
-//c.setCwbPath("~/TXM/cwb/bin");
-c.setOptions(textSortAttribute, normalizeMetadata);
-c.setAnnotationSuccess(annotationSuccess)
-c.setLang(lang);
-if (!c.run(binDir, txmDir, corpusname, null, srcfiles, metadatas)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-
-	println "-- EDITION - Building edition"
-	if (MONITOR != null) MONITOR.worked(25, "EDITION")
-	
-	File outdir = new File(binDir,"/HTML/$corpusname/default/");
-	outdir.mkdirs();
-	List<File> filelist = txmDir.listFiles();
-	Collections.sort(filelist);
-	def second = 0
-
-	println "Paginating texts: "+filelist
-
-	for (File txmFile : filelist) {
-		print "."
-		String txtname = txmFile.getName();
-		int i = txtname.lastIndexOf(".");
-		if (i > 0) txtname = txtname.substring(0, i);
-
-		List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-		List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-		Element text = params.addText(corpusElem, txtname, txmFile);
-
-		def ed = new pager(txmFile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, page_element);
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < ed.getPageFiles().size();) {
-			File f = ed.getPageFiles().get(i);
-			String wordid = ed.getIdx().get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/scripts/import/hyperbaseLoader.groovy
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/scripts/import/hyperbaseLoader.groovy	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/scripts/import/hyperbaseLoader.groovy	(revision 729)
@@ -1,161 +0,0 @@
-// Copyright © 2010-2013 ENS de Lyon.
-// Copyright © 2007-2010 ENS de Lyon, CNRS, INRP, University of
-// Lyon 2, University of Franche-Comté, University of Nice
-// Sophia Antipolis, University of Paris 3.
-//
-// The TXM platform is free software: you can redistribute it
-// and/or modify it under the terms of the GNU General Public
-// License as published by the Free Software Foundation,
-// either version 2 of the License, or (at your option) any
-// later version.
-//
-// The TXM platform 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 General Public License for more
-// details.
-//
-// You should have received a copy of the GNU General
-// Public License along with the TXM platform. If not, see
-// http://www.gnu.org/licenses.
-//
-//
-//
-// $LastChangedDate: 2015-06-03 15:04:53 +0200 (mer., 03 juin 2015) $
-// $LastChangedRevision: 2984 $
-// $LastChangedBy: mdecorde $
-//
-package org.txm.importer.hyperbase;
-
-
-import org.txm.importer.hyperbase.importer;
-import org.txm.importer.hyperbase.compiler;
-import org.txm.importer.xml.pager;
-import org.txm.objects.*;
-import org.txm.utils.*;
-import org.txm.*;
-import org.txm.scripts.teitxm.*;
-import org.txm.utils.i18n.*;
-import org.w3c.dom.Element
-import org.txm.importer.DomUtils;
-
-String userDir = System.getProperty("user.home");
-
-def MONITOR;
-boolean debug = org.txm.utils.logger.Log.isPrintingErrors();
-BaseParameters params;
-try {params = paramsBinding;MONITOR=monitor} catch (Exception)
-{	println "DEV MODE";//exception means we debug
-	debug = true
-	params = new BaseParameters(new File(userDir, "xml/TESTS/hyperbase/import.xml"))
-	params.load()
-	if (!org.txm.Toolbox.isInitialized()) {
-
-		Toolbox.setParam(Toolbox.INSTALL_DIR,new File("/usr/lib/TXM"));
-		Toolbox.setParam(Toolbox.TREETAGGER_INSTALL_PATH,new File(userDir,"treetagger"));
-		Toolbox.setParam(Toolbox.TREETAGGER_MODELS_PATH,new File(userDir,"treetagger/models"));
-		Toolbox.setParam(Toolbox.METADATA_ENCODING, "UTF-8");
-		Toolbox.setParam(Toolbox.METADATA_COLSEPARATOR, ",");
-		Toolbox.setParam(Toolbox.METADATA_TXTSEPARATOR, "\"");
-		Toolbox.setParam(Toolbox.USER_TXM_HOME, new File(System.getProperty("user.home"), "TXM"));
-	}
-}
-if (params == null) { println "no parameters. Aborting"; return; }
-
-String corpusname = params.getCorpusName();
-Element corpusElem = params.corpora.get(corpusname);
-String basename = params.name;
-String rootDir = params.rootDir;
-String lang = corpusElem.getAttribute("lang");
-String model = lang
-String encoding = corpusElem.getAttribute("encoding");
-boolean annotate = "true" == corpusElem.getAttribute("annotate");
-String xsl = params.getXsltElement(corpusElem).getAttribute("xsl")
-def xslParams = params.getXsltParams(corpusElem);
-int wordsPerPage = params.getWordsPerPage("default")
-boolean build_edition = params.getDoEdition("default")
-
-File srcDir = new File(rootDir);
-File binDir = new File(Toolbox.getParam(Toolbox.USER_TXM_HOME),"corpora/"+basename);
-binDir.deleteDir();
-binDir.mkdirs();
-if (!binDir.exists()) {
-	println "Could not create binDir "+binDir
-	return;
-}
-
-File txmDir = new File(binDir,"txm/$corpusname");
-txmDir.deleteDir();
-txmDir.mkdirs();
-
-if (MONITOR != null) MONITOR.worked(1, "IMPORTER")
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-println "-- IMPORTER - Reading source files"
-
-if (!(new importer().run(srcDir, binDir, txmDir, encoding, basename, lang))) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "ANNOTATE")
-println "-- ANNOTATE - Running NLP tools"
-boolean annotationSuccess = false;
-if ((new Annotate().run(binDir, txmDir, model+".par"))) {
-	annotationSuccess = true
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(25, "COMPILING")
-println "-- COMPILING - Building Search Engine indexes"
-def c = new compiler();
-c.setAnnotationSuccess(annotationSuccess);
-if (debug) c.setDebug();
-c.setLang(lang);
-if (!c.run(binDir, txmDir, corpusname)) {
-	println "import process stopped";
-	return;
-}
-
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-
-new File(binDir,"HTML/$corpusname").deleteDir();
-new File(binDir,"HTML/$corpusname").mkdirs();
-if (build_edition) {
-
-	println "-- EDITION - Building edition"
-	if (MONITOR != null) MONITOR.worked(20, "EDITION")
-	
-	File outdir = new File(binDir,"/HTML/$corpusname/default/");
-	outdir.mkdirs();
-	List<File> filelist = txmDir.listFiles();
-	Collections.sort(filelist);
-	def second = 0
-
-	println "Paginating texts: "
-
-	for (File srcfile : filelist) {
-		print "."
-		String txtname = srcfile.getName();
-		int i = txtname.lastIndexOf(".");
-		if(i > 0) txtname = txtname.substring(0, i);
-
-		List<String> NoSpaceBefore = LangFormater.getNoSpaceBefore(lang);
-		List<String> NoSpaceAfter = LangFormater.getNoSpaceAfter(lang);
-
-		Element text = params.addText(params.corpora.get(corpusname), txtname, srcfile);
-
-		def ed = new pager(srcfile, outdir, txtname, NoSpaceBefore, NoSpaceAfter, wordsPerPage, basename, "pb");
-		Element edition = params.addEdition(text, "default", outdir.getAbsolutePath(), "html");
-
-		for (i = 0 ; i < ed.getPageFiles().size();) {
-			File f = ed.getPageFiles().get(i);
-			String wordid = ed.getIdx().get(i);
-			params.addPage(edition, ""+(++i), wordid);
-		}
-	}
-}
-if (MONITOR != null && MONITOR.isCanceled()) { return MONITOR.done(); }
-if (MONITOR != null) MONITOR.worked(20, "FINALIZING")
-File paramFile = new File(binDir, "import.xml");
-DomUtils.save(params.root.getOwnerDocument(), paramFile);readyToLoad = true;

Property changes on: tmp/trunk/org.txm.setups/shared/all/scripts/import
___________________________________________________________________
Added: svn:ignore
   + **



Property changes on: tmp/trunk/org.txm.setups/shared/all/scripts/macro
___________________________________________________________________
Added: svn:ignore
   + **



Property changes on: tmp/trunk/org.txm.setups/shared/all/scripts/samples/groovy
___________________________________________________________________
Added: svn:ignore
   + **


Index: tmp/trunk/org.txm.setups/shared/all/css/tmx.css
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/css/tmx.css	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/css/tmx.css	(revision 729)
@@ -1,38 +0,0 @@
-body
-{
-	padding-top:25px;
-	padding-bottom:25px;
-	padding-right:10px;
-	padding-left:10px;
-}
-
-table
-{
-margin-left: auto;
-margin-right: auto;
-margin-bottom: 50px;
-}
-
-td
-{
-padding: 5px;
-}
-
-.header {
-
-}
-
-.tuTitle
-{
-text-align: center;
-}
-
-.seg
-{
-	
-}
-
-.note
-{
-	color:red;
-}
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/css/txm.css
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/css/txm.css	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/css/txm.css	(revision 729)
@@ -1,88 +0,0 @@
-/*  
-   Copyright © 2017 ENS de Lyon, CNRS, University of Franche-Comté
-   Licensed under the terms of the GNU General Public License (http://www.gnu.org/licenses)
-   @author cbourdot
-   @author sheiden
-
-   TXM default CSS 06-2017
-
-*/
-
-.txmeditionpage {
-	background-color: #f8f7ee;
-	font-family: junicode, verdana;
-	font-size: 14px;
-	text-indent: none;
-	text-align: justify;
-	box-shadow: .3125em .3125em .625em 0 #888;
-	margin: 1.25em auto;
-	padding: 1.25em;
-	width: 400px;
-	min-height: 90%;
-}
-
-.txmeditionpb {
-	text-align: center;
-}
-
-.txmeditionpb::before {
-	content: "- ";
-}
-
-.txmeditionpb::after {
-	content: " -";
-}
-
-.txmlettrinep:first-letter {
-    float: left;
-    font-size: 6em;
-    line-height: 1;
-    margin-right: 0.2em;
-}
-
-a {
-	color:#802520;
-}
-
-h1 {
-	font-size: 20px;
-	font-variant: small-caps;
-	text-align: center;
-	color:#802520;
-}
-
-h2 {
-	font-size: 18px;
-	font-variant: small-caps;
-	text-align: center;
-	color:#802520;
-}
-
-h3 {
-	font-size: 16px;
-	font-variant: small-caps;
-	text-align: center;
-	color:#802520;
-}
-
-p {
-    	text-indent: 0.2cm;
-	text-align: justify;
-    	text-justify: inter-word;	
-  }
-
-img {
-    margin: 10px 10px 10px 10px;
-}
-
-td[rend="table-cell-align-right"] {
-	text-align: right;
-}
-
-td[rend="table-cell-align-left"] {
-	text-align: left;
-}
-
-td[rend="table-cell-align-center"] {
-	text-align: center;
-}
\ No newline at end of file
Index: tmp/trunk/org.txm.setups/shared/all/css/transcriber.css
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/css/transcriber.css	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/css/transcriber.css	(revision 729)
@@ -1,58 +0,0 @@
-body
-{
-	padding-top:25px;
-	padding-bottom:25px;
-	padding-right:10px;
-	padding-left:10px;
-}
-
-.comment
-{
-	font-style:italic;
-	font-weight:normal;
-}
-
-.turn
-{
-
-}
-
-.spk
-{
-	font-variant: small-caps ; 
-}
-
-.event
-{
-	font-style:italic;
-}
-
-b .event
-{
-	font-style:italic;
-	font-weight:normal;
-}
-
-
-.sync
-{
-	vertical-align: super; 
-	font-weight:normal;
-	font-size: 70%;
-}
-table
-{
-margin-left: auto;
-margin-right: auto;
-margin-bottom: 50px;
-}
-
-td
-{
-padding: 5px;
-}
-
-h2
-{
-text-align: center;
-}
Index: tmp/trunk/org.txm.setups/shared/all/css/doc.css
===================================================================
--- tmp/trunk/org.txm.setups/shared/all/css/doc.css	(revision 728)
+++ tmp/trunk/org.txm.setups/shared/all/css/doc.css	(revision 729)
@@ -1,40 +0,0 @@
-body {
-	padding-top:25px;
-	padding-bottom:25px;
-	padding-right:10px;
-	padding-left:10px;
-	width:600px;
-}
-
-table {
-	border: medium solid black;
-	border-collapse: collapse;
-	width: 100%;
-}
-
-th {
-	font-family: monospace;
-	border: thin solid black;
-	padding: 5px;
-	background-color: #D0E3FA;
-	background-image: url(sky.jpg);
-}
-
-td {
-	font-family: sans-serif;
-	border: thin solid black;
-	width: 50%;
-	padding: 5px;
-	text-align: center;
-	background-color: #ffffff;
-}
-
-h2 {
-
-}
-
-img {
-	display: block;
-	margin: 0 auto; 
-	padding: 5px;
-}
\ No newline at end of file

Property changes on: tmp/trunk/org.txm.setups/shared/all/css
___________________________________________________________________
Added: svn:ignore
   + *.css



Property changes on: tmp/trunk/org.txm.setups/shared/win/jre
___________________________________________________________________
Added: svn:ignore
   + **



Property changes on: tmp/trunk/org.txm.setups/shared/mac/Applications/TXM/jre
___________________________________________________________________
Added: svn:ignore
   + **


