Re: [xslt] Close brace in literal terminates expression in attribute value template
- From: Nick Wellnhofer <wellnhofer aevum de>
- To: xslt gnome org
- Subject: Re: [xslt] Close brace in literal terminates expression in attribute value template
- Date: Tue, 29 Jun 2010 20:11:28 +0200
On 29/06/10 13:31, Nick Wellnhofer wrote:
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
See the following patch for a fix:
http://github.com/nwellnhof/libxslt/commit/aba14c5280c265ae8f8e7f109354e0d16410fd8c.patch
Nick
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]