• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

problem with processing instructions and variables

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
What does a metric clock look like? I bet it is nothing like this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic