[4suite] xslt problem with empty comment

Robert Forkel xrotwang at googlemail.com
Fri Dec 8 09:53:52 MST 2006


hi,
just found what seems to be a bug to me.
the follwing xslt will cause an exception when processed with 4xslt:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:variable name="stuff"></xsl:variable>
  <xsl:template match="/">
    <xsl:comment><xsl:value-of select="$stuff"/></xsl:comment>
  </xsl:template>
</xsl:stylesheet>

namely:

File "/usr/lib/python2.4/site-packages/Ft/Xml/Xslt/TemplateElement.py",
line 83, in instantiate
    child.instantiate(context, processor)
  File "/usr/lib/python2.4/site-packages/Ft/Xml/Xslt/CommentElement.py",
line 39, in instantiate
    if content[-1] == u'-':
IndexError: string index out of range

this is with 4suite XML 1.0rc5 on ubuntu 6.10 - but as far as i could
see in the cvs repository, the problem does still exist with HEAD.

regards,
robert


More information about the 4suite mailing list