[xsl] Need help rendering the HTML residing within the XML

Subject: [xsl] Need help rendering the HTML residing within the XML
From: Jeremy Graston <sushidub@xxxxxxxxxxx>
Date: Wed, 11 Aug 2004 20:28:36 -0600
First timer problem (couldn't find an exact answer in the archives): I have an XML file with a hundred plus nodes of which any number could at any time contain HTML tags such as the <b></b> tag in line 2.

1 <book>
2 <name><b>Count of Monte Cristo</b></name>
3 <author>Alexander Dumas</author>
4 <content />
5 </book>

I need my XSL file to parse the XML so that the browser (IE 6+, NN 7+) will take these <b></b> tags and apply the appropiate HTML formatting rather than treating them as XML nodes.

The browser seems to like character entity equivalents such as in line 2 below and renders the <name> node in bold when I have disable-output-escaping set to "yes".

1 <book>
2 <name>&lt;b&gt;Count of Monte Cristo&lt;/b&gt;</name>
3 <author>Alexander Dumas</author>
4 <content />
5 </page>

but the chances of getting character entitiy equivalents into my XML file vs. brackets are slim to none.

Does this mean I'd have to write a query function within the XSL that goes through every node in my XML file looking for regular HTML tags? Wouldn't this take forever to parse considering I could have upwards of a hundred nodes in my XML? Is there something I'm missing? Does anybody know of an article or link that address my problem?

Many many thanks!

jerms

Current Thread