<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ken's Blog &#187; XML</title>
	<atom:link href="http://www.kennakai.com/blog/index.php/category/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kennakai.com/blog</link>
	<description>Absolutely no business being on the Web</description>
	<lastBuildDate>Thu, 15 Jul 2010 06:11:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Web Dev: HTML passthrough during XSLT transform of XML</title>
		<link>http://www.kennakai.com/blog/2009/04/web-dev-html-passthrough-during-xslt-transform-of-xml/</link>
		<comments>http://www.kennakai.com/blog/2009/04/web-dev-html-passthrough-during-xslt-transform-of-xml/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 06:39:32 +0000</pubDate>
		<dc:creator>knakai</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.kennakai.com/blog/?p=142</guid>
		<description><![CDATA[Ugh&#8230;chalk this up to one of those relatively obscure problems where you&#8217;ve got this crazy idea (using XSLT to generate the HTML for a page based on an XML file) so you don&#8217;t have to code up a full blown server-side page that has to hand build the page (correction: you&#8217;ve got to hand build [...]]]></description>
			<content:encoded><![CDATA[<p>Ugh&#8230;chalk this up to one of those relatively obscure problems where you&#8217;ve got this crazy idea (using XSLT to generate the HTML for a page based on an XML file) so you don&#8217;t have to code up a full blown server-side page that has to hand build the page (correction: you&#8217;ve got to hand build it).</p>
<p>Anyway, I wanted to pass HTML through from the XML element to the final output. Of course, as we&#8217;re in the uber-strict world of XML, that will either: a) cause issues or b) get escaped and output to the user as HTML. I had the latter.</p>
<p>Off I went to find a solution (the usual time sink that it was) and found a couple ideas:</p>
<p>1) CDATA the content and use the <a href="http://www.xm.co.nz/ShoXS/xsloutput.htm" target="_blank">xml:output</a>&#8216;s cdata-section-elements tag to have the template ignore it. Didn&#8217;t work.</p>
<p>2) Use the xml:value-of and xml:text elements&#8217; <a href="http://www.hannonhill.com/forum/viewtopic.php?f=2&amp;t=208" target="_blank">disable-output-escaping</a>. Worked for IE but failed miserably in FF3.</p>
<p>So, I bang my head on my keyboard as I&#8217;m prone to do and I then search for why FF hates me so when I do #2 above.</p>
<p>Turns out&#8230;it has something to do with the way FF processes the XML so they don&#8217;t support the attribute. Doh! But wait&#8230;what&#8217;s this just a few search results below the top? <a href="http://www.gibdon.com/2008/05/firefox-xslt-disable-output-escaping.html" target="_blank">Switch xml:value-of to xml:copy-of</a> and lo and behold that sucker starts outputting your element&#8217;s contents verbatim!</p>
<p>Ahhh&#8230;now I can go back the the tedious task of converting my basic form (not HTML) data into XML to use my newly minted solution!!!</p>
<p>kn</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennakai.com/blog/2009/04/web-dev-html-passthrough-during-xslt-transform-of-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
