Re: [xslt] Close brace in literal terminates expression in attribute value template
- From: Stefan Kost <ensonic hora-obscura de>
- To: xslt gnome org
- Subject: Re: [xslt] Close brace in literal terminates expression in attribute value template
- Date: Wed, 30 Jun 2010 11:06:40 +0300
On 29.06.2010 21:11, Nick Wellnhofer wrote:
> 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
Please also file a upstream bug and attach the patch there (git bz). Thanks!
Stefan
[
Date Prev][Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]