Bug 19722 - XSLT concat() function bug with "}" ...
Summary: XSLT concat() function bug with "}" ...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://concentre.zensoluciones.com/xs...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-23 01:21 PDT by Sébastien Cramatte
Modified: 2008-06-23 15:45 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Cramatte 2008-06-23 01:21:40 PDT
I'm trying to concat "{" "}" characters using AVT (Atttribute Value Template) expression.
 
Wont' works under Safari 3.1.1 or 4 developper preview and with the latest  WebKit nigthly build

It works as expected under Firefox 2.x and 3 		 	 
	 
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 !

Regards
Comment 1 Mark Rowe (bdash) 2008-06-23 02:08:39 PDT
I suspect that this is a bug in the underlying library that WebKit uses to do XSLT.  If you are on Mac OS X you may be able to confirm this by running:

xsltproc test.xsl test.xml

And verifying whether the output looks as you expect.
Comment 2 Mark Rowe (bdash) 2008-06-23 02:10:55 PDT
Indeed, I see:

XPath error : Unfinished literal
compilation error: file test.xsl line 52 element div
Attribute template concentre: failed to compile concat('{',namespace-uri(),'
Comment 3 Mark Rowe (bdash) 2008-06-23 02:13:33 PDT
This looks to be a bug in libxslt rather than in WebKit.  It should be filed in the libxslt bug tracking system at <http://bugzilla.gnome.org/browse.cgi?product=libxslt> so that it can be fixed in libxslt.
Comment 4 Sébastien Cramatte 2008-06-23 02:20:23 PDT
xsltproc return me an error 

$ 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(),'
Comment 5 Sébastien Cramatte 2008-06-23 02:23:18 PDT
I'm going to report this bug to libxsl

$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

Comment 6 Mark Rowe (bdash) 2008-06-23 02:25:09 PDT
Thanks.  For the record, here is the output from a debian machine running the latest versions of libxml2/libxslt:

mrowe@bdash:~$ xsltproc test.xsl test.xml
XPath error : Unfinished literal
compilation error: file test.xsl line 52 element div
Attribute 'concentre': Failed to compile the expression 'concat('{',namespace-uri(),'' in the AVT.
mrowe@bdash:~$ xsltproc --version
Using libxml 20632, libxslt 10124 and libexslt 813
xsltproc was compiled against libxml 20632, libxslt 10124 and libexslt 813
libxslt 10124 was compiled against libxml 20632
libexslt 813 was compiled against libxml 20632
mrowe@bdash:~$ 

The error still occurs in the latest versions, just in case they suggest that you try in a newer version :)
Comment 7 Mark Rowe (bdash) 2008-06-23 15:45:43 PDT
This is in libxslt bugzilla as http://bugzilla.gnome.org/show_bug.cgi?id=539741.  Given that this bug is outside of WebKit, I shall close this report.  Thanks for re-filing the bug!