<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/pretty-markup/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/pretty-markup/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 14 May 2012 15:35:02 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/pretty-markup/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Home modified by OmniMark Code</title><link>https://sourceforge.net/p/pretty-markup/wiki/Home/</link><description>&lt;pre&gt;--- v4 
+++ v5 
@@ -3,14 +3,14 @@
 
 Any OmniMark veteran has probably written (or copied) the following OmniMark element rule hundreds of times: 
 
-&lt;pre&gt;
-element #implied
-   output "&lt;%q"
-   repeat over specified attributes as a
-      output " " || key of attribute a || "=%"" || attribute a || "%""
-   again
-   output "&gt;%c&lt;/%q&gt;"
-&lt;/pre&gt;
+&lt;div class="codehilite"&gt;&lt;pre&gt;
+&lt;span class="kr"&gt;element&lt;/span&gt; &lt;span class="nb"&gt;#implied&lt;/span&gt;
+   &lt;span class="kr"&gt;output&lt;/span&gt; &lt;span class="s"&gt;"&amp;lt;%q"&lt;/span&gt;
+   &lt;span class="kr"&gt;repeat&lt;/span&gt; &lt;span class="kr"&gt;over&lt;/span&gt; &lt;span class="kr"&gt;specified&lt;/span&gt; &lt;span class="kr"&gt;attributes&lt;/span&gt; &lt;span class="kr"&gt;as&lt;/span&gt; a
+      &lt;span class="kr"&gt;output&lt;/span&gt; &lt;span class="s"&gt;" "&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="kr"&gt;key&lt;/span&gt; &lt;span class="kr"&gt;of&lt;/span&gt; &lt;span class="kr"&gt;attribute&lt;/span&gt; a &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s"&gt;"=%""&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="kr"&gt;attribute&lt;/span&gt; a &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s"&gt;"%""&lt;/span&gt;
+   &lt;span class="kr"&gt;again&lt;/span&gt;
+   &lt;span class="kr"&gt;output&lt;/span&gt; &lt;span class="s"&gt;"&gt;%c&amp;lt;/%q&gt;"&lt;/span&gt;
+&lt;/pre&gt;&lt;/div&gt;
 
 This simple rule attempts to reproduce the original markup in textual form. That is not exactly what it does,  however. There are several corner cases which would make the output malformed.
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">OmniMark Code</dc:creator><pubDate>Mon, 14 May 2012 15:35:02 -0000</pubDate><guid>https://sourceforge.net6996e6f89e656c8b25eb711e264e7f6b9f2bc4d2</guid></item><item><title>WikiPage Home modified by OmniMark Code</title><link>https://sourceforge.net/p/pretty-markup/wiki/Home/</link><description>&lt;pre&gt;--- v3 
+++ v4 
@@ -41,10 +41,10 @@
 
 Even if we take care to always produce well-formed markup and thus make its parsers happy with the result,  humans can find it difficult to read. At this point, however, we're moving from the realm of *serializing* markup  so it can be fed to a parser, to its *pretty printing* for human consumption. The rest of this article will  discuss both tasks, covering XML and SGML in turn. 
 
-[Serializing XML]
-[Serializing SGML]
-[Modularizing]
-[Pretty-printing]
+* [Serializing XML](../Serializing%20XML)
+* [Serializing SGML](../Serializing%20SGML)
+* [Modularizing](../Modularizing)
+* [Pretty-printing](../Pretty-printing)
 
 
 [[project_admins]]
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">OmniMark Code</dc:creator><pubDate>Fri, 11 May 2012 18:45:06 -0000</pubDate><guid>https://sourceforge.nete62eb1c71aabd24738f94cbf262e23ca372aac6d</guid></item><item><title>WikiPage Home modified by OmniMark Code</title><link>https://sourceforge.net/p/pretty-markup/wiki/Home/</link><description>&lt;pre&gt;--- v2 
+++ v3 
@@ -43,6 +43,8 @@
 
 [Serializing XML]
 [Serializing SGML]
+[Modularizing]
+[Pretty-printing]
 
 
 [[project_admins]]
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">OmniMark Code</dc:creator><pubDate>Fri, 11 May 2012 18:42:47 -0000</pubDate><guid>https://sourceforge.netb00ddc7df3321406b343e173017f89eae6d6e6fd</guid></item><item><title>WikiPage Home modified by OmniMark Code</title><link>https://sourceforge.net/p/pretty-markup/wiki/Home/</link><description>&lt;pre&gt;--- v1 
+++ v2 
@@ -1,8 +1,49 @@
-Welcome to your wiki!
-
-This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
-
-The wiki uses [Markdown](/p/pretty-markup/wiki/markdown_syntax/) syntax.
+Printing Markup Prettily
+========================
+
+Any OmniMark veteran has probably written (or copied) the following OmniMark element rule hundreds of times: 
+
+&lt;pre&gt;
+element #implied
+   output "&lt;%q"
+   repeat over specified attributes as a
+      output " " || key of attribute a || "=%"" || attribute a || "%""
+   again
+   output "&gt;%c&lt;/%q&gt;"
+&lt;/pre&gt;
+
+This simple rule attempts to reproduce the original markup in textual form. That is not exactly what it does,  however. There are several corner cases which would make the output malformed.
+
+An attribute value that contains quotes, ampersands, or less-than characters would lead to malformed start  tags. For example,
+
+    &lt;a text="He yelled &amp;quot;help&amp;quot;"&gt;
+
+
+would become 
+
+    &lt;a text="He yelled "help""&gt;
+
+
+The original element content could contain ampersands or less-than characters which would also lead to malformed  printout:
+
+    &lt;a&gt;3*a&amp;lt;b&lt;/a&gt;
+
+
+would be formatted as 
+
+    &lt;a&gt;3*a&lt;b&lt;/a&gt;
+
+There are other things that could go wrong:
+
+* You may want to escape all non-ASCII characters using either numeric character references or named entities. In  fact, tab and newline characters in attributes *must* be escaped, otherwise the XML parser will replace them  by spaces.  
+* If the element was empty, we should output an empty tag. In case of an XML document instance, this is a matter  of aesthetics; but if we're trying to reproduce an SGML document, empty elements are not allowed to have  end-tags.  
+* The original markup may have contained comments, processing instructions, entity references, or marked  sections. They would be lost in the output. 
+
+Even if we take care to always produce well-formed markup and thus make its parsers happy with the result,  humans can find it difficult to read. At this point, however, we're moving from the realm of *serializing* markup  so it can be fed to a parser, to its *pretty printing* for human consumption. The rest of this article will  discuss both tasks, covering XML and SGML in turn. 
+
+[Serializing XML]
+[Serializing SGML]
+
 
 [[project_admins]]
 [[download_button]]
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">OmniMark Code</dc:creator><pubDate>Fri, 11 May 2012 18:31:37 -0000</pubDate><guid>https://sourceforge.netc074dbb1e69bb89a267ff393eeb82b3bc3f75791</guid></item><item><title>WikiPage Home modified by OmniMark Code</title><link>https://sourceforge.net/p/pretty-markup/wiki/Home/</link><description>Welcome to your wiki!

This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].

The wiki uses [Markdown](/p/pretty-markup/wiki/markdown_syntax/) syntax.

[[project_admins]]
[[download_button]]
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">OmniMark Code</dc:creator><pubDate>Thu, 10 May 2012 16:48:18 -0000</pubDate><guid>https://sourceforge.net82e3621c1ff0facc0ce7477024e775baaccc232b</guid></item></channel></rss>