Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with processing instructions and variables

 
Kelly Dolan
Ranch Hand
Posts: 109
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working in some legacy code and encountering a very strange problem.

I have XML that contain <title> elements and the value of these elements contain processing instructions. On application of XSL, the output contains [%{#:#}%] where # is either blank or some number. What I've discovered so far is...

1. It seems to occur when the value of the title is stored in a variable. (e.g., <xsl:variable name=blah><xsl:value-of select=normalize-space() /></xsl:variable>)
2. The use of text() or "." instead of normalize-space() does not change matters.
3. If I don't use a variable and pass normalize-space() to the thing that is actually using it, things work.
4. I do not experience this in plain Java. i.e., using Java objects to perform the transformation
5. I do not experience this in plain IE. i.e., where the XML file references the XSL file and performs the transformation
6. I do not experience this in plain JavaScript. i.e., when I write a script function that uses the IE ActiveX objects (3.0)
7. I experience this in IE8 w/ code that uses the IE ActiveX objects (3.0). The difference between this code and the sample I wrote for (5) is unknown ... the real code is very cryptic and mostly generated so it's a slow process trying to figure out what exactly is going on.

So, just curious - has anyone seen this before and know what to do? Any suggestions on where else I might be able to find an answer? Currently, I'm trying to find occurrences of this and avoid the use of variables but I'm finding it difficult in some locations.

Thanks!
 
g tsuji
Ranch Hand
Posts: 650
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If that is what observed, could you post a small test sample (probably reflecting some essential/local aspect of the xml/xsl you're working on) demonstrating the problem?
 
Kelly Dolan
Ranch Hand
Posts: 109
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To close out this thread, I found where the funky character pattern was coming from...somewhere within our own code. So, this isn't a problem w/ XSLT in general.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic