XSL stylesheet 2<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' > |
<xsl:template match="/"> |
<DIV> |
<B><xsl:text> Text from position </xsl:text> |
<xsl:value-of select="//start * -1"/> |
<xsl:text> : </xsl:text> </B> |
<xsl:value-of select="substring(//text,//start * -1)"/> |
</DIV> |
<DIV> |
<B><xsl:text> Text from position </xsl:text> |
<xsl:value-of select="//start + 0.45"/> |
<xsl:text> : </xsl:text> </B> |
<xsl:value-of select="substring(//text,//start + 0.45)"/> |
</DIV> |
<DIV> |
<B><xsl:text> Text from position </xsl:text> |
<xsl:value-of select="//start *-2"/> |
<xsl:text> of length </xsl:text> |
<xsl:value-of select="//end *1.5"/> |
<xsl:text> : </xsl:text> </B> |
<xsl:value-of select="substring(//text,//start * -2,//end * 1.5)"/> |
</DIV> |
<DIV> |
<B><xsl:text> Text from position </xsl:text> |
<xsl:value-of select="//start + 0.4"/> |
<xsl:text> of length </xsl:text> |
<xsl:value-of select="//end div 10 + 0.7"/> |
<xsl:text> : </xsl:text> </B> |
<xsl:value-of select="substring(//text,//start + 0.4,//end div 10 + 0.7)"/> |
</DIV> |
<DIV> |
<B><xsl:text> Text from position </xsl:text> |
<xsl:value-of select="//start + 0.4"/> |
<xsl:text> of length </xsl:text> |
<xsl:value-of select="//end div 10 + 0.2"/> |
<xsl:text> : </xsl:text> </B> |
<xsl:value-of select="substring(//text,//start + 0.4,//end div 10 + 0.2)"/> |
</DIV> |
</xsl:template> |
</xsl:stylesheet> |