This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Escaping special characters with XSLTC

 
Bennett Rainville
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am working on an application that uses XSLT. Some of the transformations we do are quite large, so we are switching to XSLTC to improve performance. I have got most of our transforms to work, but one has me stumped.

One of the things this transform does is convert symbols to their unicode equivalents. Here is a snippet of the transform:



This code worked fine before we switched to XSLTC. However, after the switch, we have been getting an error when the XSL is compiled:

ERROR: line 126: Cannot parse attribute value template '{'.'

Line 126 is the line with the comment LEFT CURLY BRACKET.

Any idea what's going on? I think this is an escaping issue...
[ July 31, 2007: Message edited by: Bennett Rainville ]
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The business of curly brackets (a.k.a. curly braces) is covered in section 7.6.2 of the XSLT recommendation. As far as I can see it's trying to say that in an attribute where an Attribute Value Template can be used, you have to escape those curlies by doubling them if you don't intend them to be AVT delimiters.

It's a bit unclear, though, but if you read section 5.6 of the XSLT 2.0 recommendation you'll see it's been clarified as to how curly-escaping is supposed to work.

So it looks like there might be a little bit of non-conforming behaviour in one of your two XSLT processors, but I couldn't say for certain which one.
[ July 31, 2007: Message edited by: Paul Clapham ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic