File:  [Repository] / ECHO_content / analyseAndTag / lemmatize.xsl
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Sun Sep 10 11:03:07 2006 UTC (17 years, 10 months ago) by dwinter
Branches: MAIN
CVS tags: HEAD
new version of lexical analysis hub

    1: 
    2: <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" extension-element-prefixes="str"
    3:   exclude-result-prefixes="str" xmlns:mpiwg="http://www.mpiwg-berlin.mpg.de/namespace">
    4: <xsl:template match="/" >
    5: <text>
    6:   <xsl:apply-templates />
    7: </text>
    8: </xsl:template>
    9: <xsl:template match="*">
   10: <xsl:apply-templates mode="body"/>
   11: </xsl:template>
   12: 
   13: <xsl:template match="text()" mode="body">
   14: <xsl:variable name="tokenizedSample" select="str:tokenize(.)"/>
   15:     <xsl:for-each select="$tokenizedSample">
   16:       <mpiwg:w><xsl:value-of select="."/></mpiwg:w>      
   17:     </xsl:for-each>
   18: </xsl:template>
   19: 
   20: <xsl:template match="head" mode="body"/>
   21: 
   22: <xsl:template match="*" mode="body">
   23: <!--<xsl:element name="{local-name()}">-->
   24: <xsl:copy>
   25: <xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
   26: <xsl:apply-templates mode="body"/>
   27: </xsl:copy>
   28: </xsl:template>
   29: 
   30: </xsl:stylesheet>

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