<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: IndentXml CF UDF</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2008/05/01/indentxml-cf-udf/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.barneyb.com/barneyblog/2008/05/01/indentxml-cf-udf/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<lastBuildDate>Thu, 11 Sep 2014 09:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/01/indentxml-cf-udf/comment-page-1/#comment-83191</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Thu, 01 May 2008 22:21:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=388#comment-83191</guid>
		<description>XSL&#039;s an interesting solution, though it requires the source to be valid XML, and doesn&#039;t reformat the document, it creates a new document with the same semantics.  Self-closed and empty-body elements have identical semantics; there&#039;s no way to carry the distinction through an actual transformation.  This XSL also doesn&#039;t preserve CDATA blocks.  So while XSL is probably a more pure solution, it&#039;s not without downsides.</description>
		<content:encoded><![CDATA[<p>XSL's an interesting solution, though it requires the source to be valid XML, and doesn't reformat the document, it creates a new document with the same semantics.  Self-closed and empty-body elements have identical semantics; there's no way to carry the distinction through an actual transformation.  This XSL also doesn't preserve CDATA blocks.  So while XSL is probably a more pure solution, it's not without downsides.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/01/indentxml-cf-udf/comment-page-1/#comment-83184</link>
		<dc:creator>Joshua</dc:creator>
		<pubDate>Thu, 01 May 2008 22:12:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=388#comment-83184</guid>
		<description>I usually use xsl transforms. Although that may not have been useful for what you wanted? There are several variants on this available on the web.

&lt;code&gt;

&lt;xsl:stylesheet version=&quot;1.0&quot; 
     xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
  &lt;xsl:output method=&quot;xml&quot;/&gt;
  &lt;xsl:param name=&quot;indent-increment&quot; select=&quot;&#039;   &#039;&quot; /&gt;

  
  &lt;xsl:template match=&quot;*&quot;&gt;
     &lt;xsl:param name=&quot;indent&quot; select=&quot;&#039;&#xA;&#039;&quot;/&gt;
  
     &lt;xsl:value-of select=&quot;$indent&quot;/&gt;

     &lt;xsl:copy&gt;
       &lt;xsl:copy-of select=&quot;@*&quot; /&gt;
       &lt;xsl:apply-templates&gt;
         &lt;xsl:with-param name=&quot;indent&quot;
              select=&quot;concat($indent, $indent-increment)&quot;/&gt;

       &lt;/xsl:apply-templates&gt;
       &lt;xsl:value-of select=&quot;$indent&quot;/&gt;
     &lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template match=&quot;comment()&#124;processing-instruction()&quot;&gt;

     &lt;xsl:copy /&gt;
  &lt;/xsl:template&gt;
  
  &lt;!-- WARNING: this is dangerous. Handle with care --&gt;
  &lt;xsl:template match=&quot;text()[normalize-space(.)=&#039;&#039;]&quot;/&gt;
  
&lt;/xsl:stylesheet&gt;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I usually use xsl transforms. Although that may not have been useful for what you wanted? There are several variants on this available on the web.</p>
<p><code></p>
<p>&lt;xsl:stylesheet version=&quot;1.0&quot;<br />
     xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;<br />
  &lt;xsl:output method=&quot;xml&quot;/&gt;<br />
  &lt;xsl:param name=&quot;indent-increment&quot; select=&quot;'   '&quot; /&gt;</p>
<p>  &lt;xsl:template match=&quot;*&quot;&gt;<br />
     &lt;xsl:param name=&quot;indent&quot; select=&quot;'&amp;#xA;'&quot;/&gt;</p>
<p>     &lt;xsl:value-of select=&quot;$indent&quot;/&gt;</p>
<p>     &lt;xsl:copy&gt;<br />
       &lt;xsl:copy-of select=&quot;@*&quot; /&gt;<br />
       &lt;xsl:apply-templates&gt;<br />
         &lt;xsl:with-param name=&quot;indent&quot;<br />
              select=&quot;concat($indent, $indent-increment)&quot;/&gt;</p>
<p>       &lt;/xsl:apply-templates&gt;<br />
       &lt;xsl:value-of select=&quot;$indent&quot;/&gt;<br />
     &lt;/xsl:copy&gt;<br />
  &lt;/xsl:template&gt;</p>
<p>  &lt;xsl:template match=&quot;comment()|processing-instruction()&quot;&gt;</p>
<p>     &lt;xsl:copy /&gt;<br />
  &lt;/xsl:template&gt;</p>
<p>  &lt;!-- WARNING: this is dangerous. Handle with care --&gt;<br />
  &lt;xsl:template match=&quot;text()[normalize-space(.)='']&quot;/&gt;</p>
<p>&lt;/xsl:stylesheet&gt;<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
