[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: generate an id
This is the template which I call it to segment a text to "sentences"
(special caracteres as delimetrs)
(I am modifing the module "strSplit-to-word.xsl" in fxsl library, to permit the split to sentence.) <xsl:template match="str-split2words-func:*"> <xsl:param name="arg1" select="/.."/> <xsl:param name="arg2"/> <xsl:copy-of select="$arg1/*[1]"/> <xsl:copy-of select="$arg1/sentence[position() != last()]"/> <xsl:choose> <xsl:when test="contains($arg1/*[1], $arg2)"> <xsl:if test="string($arg1/sentence[last()])"> <xsl:copy-of select="$arg1/sentence[last()]"/> </xsl:if> <sentence/> </xsl:when> <xsl:otherwise> <sentence> <xsl:attribute name="stamp"> <xsl:value-of select="generate-id()"/> </xsl:attribute> <xsl:attribute name="status">nonDisamb</xsl:attribute> <original> <xsl:attribute name="sourceLang">En</xsl:attribute> <xsl:value-of select="concat($arg1/sentence[last()], $arg2)"/> </original> </sentence> </xsl:otherwise> </xsl:choose> </xsl:template> Tx for your help Ali, From: Geert Josten <Geert.Josten@xxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: generate an id Date: Mon, 11 Jul 2005 15:16:16 +0200 _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|