We have a parent-child table set up to maintain content.
When this table is updated, I do a recursive call through the data and spit
out an XML file.
Then, when we want to display this content, I load up the XML file, attach
the XSL file to it, and do the transformation via VB.net and send it off to
the browser.
The problem is that much of this content is HTML. As such, I'm storing it in
the database as encoded HTML. I'm confused as to when/where I should decode
it.
For starters, I just grabbed the raw data from the DB, spit out the XML, and
then in my XSL file, added a few wrapper HTML tags and dumped it to screen.
This does not work, as I'm combining encoded HTML in the XML file with
regular HTML in my XSL. This is messy, to say the least.
My second thought is to unencode the HTML before putting it into the XML
file, but I have no idea how to do that without invalidating the XML file.
Third thought was to write encoded HTML in my XSL file instead of regular
HTML and then, just prior to rendering it to screen, then unencode the
entire thing. But that makes for a less readable XSL file and doesn't seem
quite right either.
I'm stumped. Any thoughts/suggestions?
-Darrel