After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 539741 - XSLT concat() function bug with "}" ...
XSLT concat() function bug with "}" ...
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Mac OS
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2008-06-23 12:50 UTC by Sébastien Cramatte
Modified: 2008-06-25 21:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sébastien Cramatte 2008-06-23 12:50:35 UTC
I'm trying to concat "{" "}" characters using AVT (Atttribute Value Template)
expression.
I believed that this bug was related to Safari because wont' works under Safari 3.1.1 or 4 developper preview and with the latest WebKit nigthly build and It works as expected under Firefox 2.x and 3 and IE. 

Take a look to this testcase  
http://concentre.zensoluciones.com/xslttest/concatbug.xhtml

Unfortunately seems that is a bug of libxslt that use apple inside webkit.
Because xsltproc return me error too !
             
I'm running OS X leopard 10.5.3 (the latest release from apple)

My XPath expression

concat('{',namespace-uri(),'}',local-name())

If you put something like this in the xsl stylesheet 

<myelt myattr={concat('{',namespace-uri(),'}',local-name())}" ... />

XSLT processor doesn't render page ...
Take a look to the testcase.

It's an annoying BUG !

--- 
$xsltproc test.xsl test.xml
XPath error : Unfinished literal
compilation error: file test.xsl line 43 element div
Attribute template concentre: failed to compile concat('{',namespace-uri(),'

---
$xsltproc  --version
Using libxml 20616, libxslt 10112 and libexslt 810
xsltproc was compiled against libxml 20616, libxslt 10112 and libexslt 810
libxslt 10112 was compiled against libxml 20616
libexslt 810 was compiled against libxml 20616


You can download test.xml and test.xsl here
http://concentre.zensoluciones.com/xslttest/concatbug.xhtml


Regards
Comment 1 Sébastien Cramatte 2008-06-23 13:01:46 UTC
I've installed the latest libxml and libxslt form macports.org and I've got the same problem !

$ xsltproc --version
Using libxml 20631, libxslt 10123 and libexslt 813
xsltproc was compiled against libxml 20631, libxslt 10123 and libexslt 813
libxslt 10123 was compiled against libxml 20631
libexslt 813 was compiled against libxml 20631
sebasOSX:~ scramatte$ cd Desktop/xsltest/
sebasOSX:xsltest scramatte$ xsltproc test.xsl test.xml
XPath error : Unfinished literal
compilation error: file test.xsl line 43 element div
Attribute 'concentre': Failed to compile the expression 'concat('{',namespace-uri(),'' in the AVT.
Comment 2 Sébastien Cramatte 2008-06-24 07:04:05 UTC
Someone test it under debian with the latest library. And the same problem occur !
https://bugs.webkit.org/show_bug.cgi?id=19722#c6
Comment 3 William M. Brack 2008-06-25 07:10:34 UTC
I enhanced the coding in libxslt/attrvt.c, and hope that this will solve the problem.  Please try it out.  Changed code is in SVN.
Comment 4 Mark Rowe 2008-06-25 21:37:54 UTC
I've verified with r1481 that the error no longer occurs and that the output looks correct.  Thanks for the quick fix William!