Re: [xslt] Close brace in literal terminates expression in attribute value template



I also can't confirm this bug with the latest version of libxslt. The code in attrvt.c for precompiled attribute value templates handles string literals correctly. But the code in templates.c that processes AVTs directly doesn't:

$ cat avt-bug.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
    <xsl:template match="/">
        <xsl:element name="{substring('abc}', 1, 3)}"/>
    </xsl:template>
</xsl:stylesheet>
$ xsltproc avt-bug.xsl avt-bug.xsl
XPath error : Unfinished literal
runtime error: file avt-bug.xsl line 4 element element
xsltAttrTemplateValueProcessNode: unmatched '}'
runtime error: file avt-bug.xsl line 4 element element
xsl:element: The effective name '', 1, 3)}' is not a valid QName.
no result for avt-bug.xsl

Nick


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]