Hallo
Vielleich hat jemand von euch eine Idee oder Hinweis.
Ich muss den Text in Worte zerlegen.
Mein Lösungsansatz gibt allerdings nur ein Wort aus:
Danke im Voraus
Vielleich hat jemand von euch eine Idee oder Hinweis.
Ich muss den Text in Worte zerlegen.
Mein Lösungsansatz gibt allerdings nur ein Wort aus:
Code:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:call-template name="tokenToElement"> <xsl:with-param name="words" select="'hallo ich bin ein Text'"/> </xsl:call-template> </xsl:template> <xsl:template match="keywords" name="tokenToElement"> <xsl:param name="words" select="concat(.,' ')"/> <xsl:choose> <xsl:when test="string-length($words)>1"> <keyword> <xsl:value-of select="substring-before($words,' ')"/> </keyword> <xsl:call-template name="tokenToElement"> <xsl:with-param name="words" select="substring-before($words,' ')"/> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:template> </xsl:stylesheet>
Danke im Voraus
Comment