• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Escaping special characters with XSLTC

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic