0

I have an XSL file I am loading in flash that includes the following snippet:

<xsl:text>&#x2022;</xsl:text>

I load it this way:

_root.brochure_xsl = new XML();
_root.brochure_xsl.onLoad = function() {
    _root.SendPdfXml();
}
_root.brochure_xsl.ignoreWhite = true;
_root.brochure_xsl.load(_root.appSettings.XmlDataLocation +"xml/brochure.xsl");

On the event, I trace the results like such:

send_lv.XslContent = _root.brochure_xsl.toString();
trace(send_lv.XslContent);

In the result trace, it converts the snippet to a bullet.

<xsl:text>

*

</xsl:text>

I want it to stay the encoded, is this possible?

Dimitre Novatchev
  • 240,661
  • 26
  • 293
  • 431
Shawn
  • 19,465
  • 20
  • 98
  • 152

3 Answers3

1

This is certainly an encoding issue. The toString() method is suspect, but you have to check. Can you dump the contents of the XML character-by-character.

dirkgently
  • 108,024
  • 16
  • 131
  • 187
1

What if you encode it twice in the XML:

<xsl:text>&amp;#x2022;</xsl:text>
David
  • 34,223
  • 3
  • 62
  • 80
  • I wouldn't say this is a hack. Your code is doing exactly what you are telling it to do. As soon as your XML is parsed, the • entity is decoded into the matching unicode character, then your XSL just prints on that character. – David Apr 03 '09 at 19:43
0

Fixed by not using the XML object. Instead just used a URL Loader.

Shawn
  • 19,465
  • 20
  • 98
  • 152