File:  [Repository] / ECHO_content / analyseAndTag / lemmatize.xsl
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Mon Sep 11 14:43:23 2006 UTC (17 years, 8 months ago) by dwinter
Branches: MAIN
CVS tags: cleanup, Root_cleanup, HEAD
verbesserung fŸr text unterstŸtzung, text kann jetzt aus url kommen, sprache bisher nur deutsch


<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" extension-element-prefixes="str"
  exclude-result-prefixes="str" xmlns:mpiwg="http://www.mpiwg-berlin.mpg.de/namespace">
	
<xsl:template match="/" >
<text>
  <xsl:apply-templates />
</text>
</xsl:template>
<xsl:template match="*">
<xsl:apply-templates mode="body"/>
</xsl:template>

<xsl:template match="text()" mode="body">
<xsl:variable name="tokenizedSample" select="str:tokenize(.)"/>
    <xsl:for-each select="$tokenizedSample">
      <mpiwg:w><xsl:attribute name="lang">de</xsl:attribute><xsl:value-of select="."/></mpiwg:w>      
    </xsl:for-each>
</xsl:template>

<xsl:template match="head" mode="body"/>

<xsl:template match="*" mode="body">
<!--<xsl:element name="{local-name()}">-->
<xsl:copy>
<xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
<xsl:apply-templates mode="body"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>