<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Tom Moertel's Weblog: PXSL Tools 1.0: Your ticket out of XML Hell</title>
    <link>http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Quality rants on programming theory and stuff geeks like</description>
    <item>
      <title>PXSL Tools 1.0: Your ticket out of XML Hell</title>
      <description>&lt;p&gt;&lt;span class="caps"&gt;XML&lt;/span&gt; is fine for representing document-like things, but when it&amp;#8217;s
twisted to represent build recipes, configuration files, and little
programming languages, it opens the gates to &lt;em&gt;&lt;span class="caps"&gt;XML&lt;/span&gt; Hell&lt;/em&gt;.  Once the
gates are opened, the demons of cargo-cult thinking are loosed upon
the world, where they are free to trick innocent programmers into
working with grotesquely twisted &lt;span class="caps"&gt;XML&lt;/span&gt; documents &amp;#8211; something no human
mind was designed to comprehend.  Ensnared, these programmers are
slowly drawn into the depths of &lt;span class="caps"&gt;XML&lt;/span&gt; Hell, from which their
&lt;a href="http://www.google.com/search?q=%22xml+hell%22"&gt;lamentations echo across the
universe&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;When the demons of cargo-cult thinking come for you, don&amp;#8217;t be
ensnared!  Instead, be prepared &amp;#8211; with &lt;span class="caps"&gt;PXSL&lt;/span&gt; &amp;#8211; the &lt;a href="http://community.moertel.com/ss/space/pxsl"&gt;Parsimonious &lt;span class="caps"&gt;XML&lt;/span&gt;
Shorthand Language&lt;/a&gt;
(pronounced &amp;#8220;pixel&amp;#8221;).&lt;/p&gt;


	&lt;p&gt;What&amp;#8217;s &lt;span class="caps"&gt;PXSL&lt;/span&gt;?  It&amp;#8217;s a luxurious, thermonuclear smoking jacket that you
can slip on using a convenient preprocessor.  Use it whenever you see
grotesque &lt;span class="caps"&gt;XML&lt;/span&gt; on the horizon.  Within &lt;span class="caps"&gt;PXSL&lt;/span&gt;&amp;#8217;s plush (and stylish)
protection, you can create all the nasty, twisted &lt;span class="caps"&gt;XML&lt;/span&gt; that may be
demanded of you, but you need not descend into &lt;span class="caps"&gt;XML&lt;/span&gt; Hell to do it.
Instead, you can work from the comfort of a well-stocked lounge, where
clarity and conciseness are always on tap.&lt;/p&gt;


	&lt;p&gt;For example, here&amp;#8217;s a snippet from an &lt;span class="caps"&gt;XSLT&lt;/span&gt; stylesheet, in the
original &lt;span class="caps"&gt;XML&lt;/span&gt;:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;&amp;lt;xsl:template match="/"&amp;gt;
  &amp;lt;xsl:for-each select="//*/@src|//*/@href"&amp;gt;
    &amp;lt;xsl:value-of select="."/&amp;gt;
    &amp;lt;xsl:text&amp;gt;&amp;amp;#10;&amp;lt;/xsl:text&amp;gt;
  &amp;lt;/xsl:for-each&amp;gt;
&amp;lt;/xsl:template&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;And here&amp;#8217;s the same snippet, written in &lt;span class="caps"&gt;PXSL&lt;/span&gt;:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;template /
  for-each //*/@src|//*/@href
    value-of .
    text &amp;lt;&amp;lt;&amp;amp;#10;&amp;gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Isn&amp;#8217;t that refreshing?&lt;/p&gt;


	&lt;h3&gt;Why &lt;span class="caps"&gt;PXSL&lt;/span&gt;?&lt;/h3&gt;


	&lt;p&gt;There are lots of &lt;span class="caps"&gt;XML&lt;/span&gt; shorthands available.  (The &lt;a href="http://community.moertel.com/ss/space/PXSL/FAQs"&gt;&lt;span class="caps"&gt;PXSL FAQ&lt;/span&gt;&lt;/a&gt; lists about ten of them.)  So why choose
&lt;span class="caps"&gt;PXSL&lt;/span&gt;?  Here&amp;#8217;s why:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;strong&gt;&lt;span class="caps"&gt;PXSL&lt;/span&gt; lets you intermix &lt;span class="caps"&gt;PXSL&lt;/span&gt; and &lt;span class="caps"&gt;XML&lt;/span&gt; syntax&lt;/strong&gt; in one document. Feel free to use whichever syntax works best for each portion of your documents.  (See &lt;a href="http://community.moertel.com/pxsl/#xml-quoting-lt-lt-gt-gt-delimiters"&gt;the &lt;span class="caps"&gt;PXSL&lt;/span&gt; documentation&lt;/a&gt; for some examples.)&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;&lt;span class="caps"&gt;PXSL&lt;/span&gt; is customizable&lt;/strong&gt; with application-specific shortcuts.  (The &lt;span class="caps"&gt;PXSL&lt;/span&gt; snippet above, for example, uses &lt;span class="caps"&gt;XSLT&lt;/span&gt; shortcuts. Again, &lt;a href="http://community.moertel.com/pxsl/#element-defaults-provide-convenient-customizable-shortcuts"&gt;the &lt;span class="caps"&gt;PXSL&lt;/span&gt; documentation&lt;/a&gt; has examples.)&lt;/li&gt;
		&lt;li&gt;&lt;strong&gt;&lt;span class="caps"&gt;PXSL&lt;/span&gt; has a powerful macro system&lt;/strong&gt; that lets you build complicated document structures safely and conveniently.  (Read about &lt;a href="http://community.moertel.com/pxsl/#macro-facility"&gt;macros in the &lt;span class="caps"&gt;PXSL&lt;/span&gt; documentation&lt;/a&gt;.  For an advanced example of what you can do with &lt;span class="caps"&gt;PXSL&lt;/span&gt; macros, see this &lt;a href="http://www.kuro5hin.org/story/2003/6/4/12434/75716"&gt;article on refactoring &lt;span class="caps"&gt;XSLT&lt;/span&gt; one-offs into clean, maintainable code&lt;/a&gt;.)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Also, &lt;span class="caps"&gt;PXSL&lt;/span&gt; is battle tested.  It was first released in 2003 and has
been saving people from &lt;span class="caps"&gt;XML&lt;/span&gt; Hell since.  People who try it seem to like it:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;em&gt;I think &lt;span class="caps"&gt;PXSL&lt;/span&gt; could do wonders for soothing my irrational hatred for all things &lt;span class="caps"&gt;XML&lt;/span&gt;.&lt;/em&gt; &amp;#8212;&lt;a href="http://koweynlg.blogspot.com/2006/03/mmax-encore-encore-yay-pxsl.html"&gt;kowey&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Impressive&amp;#8230; I converted some of my files from &lt;span class="caps"&gt;XML&lt;/span&gt; to &lt;span class="caps"&gt;PXSL&lt;/span&gt; and the readability was much improved.&lt;/em&gt; &amp;#8212;&lt;a href="http://community.moertel.com/ss/comments/PXSL+Ask-a-Question#comment-PXSL%20Ask-a-Question-6"&gt;chris&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;em&gt;Quite aside from the fact that &lt;span class="caps"&gt;XSLT&lt;/span&gt; is finally somewhat readable, the fact that you&amp;#8217;ve added a serious macro system means that some serious scripting of &lt;span class="caps"&gt;XML&lt;/span&gt; can occur. I&amp;#8217;m very impressed.&lt;/em&gt; &amp;#8212;&lt;a href="http://community.moertel.com/ss/comments/PXSL+Ask-a-Question#comment-PXSL%20Ask-a-Question-4"&gt;invisible&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;The next time you&amp;#8217;re headed for &lt;span class="caps"&gt;XML&lt;/span&gt; Hell, why not &lt;a href="http://community.moertel.com/pxsl/#getting-or-building-the-pxsl-tools"&gt;give the venerable &lt;span class="caps"&gt;PXSL&lt;/span&gt; a try&lt;/a&gt;?  You might just find that you like it, too.&lt;/p&gt;


&lt;hr/&gt;

	&lt;p&gt;This public service announcement was brought to you in celebration of
the 1.0 release of the &lt;strong&gt;pxsl-tools&lt;/strong&gt; package.  The &lt;span class="caps"&gt;PXSL&lt;/span&gt;-to-XML compiler
&lt;em&gt;pxslcc&lt;/em&gt; is written in &lt;a href="http://haskell.org/"&gt;Haskell&lt;/a&gt; and uses the
cross-platform &lt;a href="http://www.haskell.org/cabal/"&gt;Haskell Cabal&lt;/a&gt;
build/package system to let you use &lt;span class="caps"&gt;PXSL&lt;/span&gt; just about anywhere.&lt;/p&gt;</description>
      <pubDate>Mon, 17 Dec 2007 22:33:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:fd34e396-beca-406a-9f9e-46a1dd5fe7ce</guid>
      <author>Tom Moertel</author>
      <link>http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell</link>
      <category>programming</category>
      <category>haskell</category>
      <category>xml</category>
      <category>pxsl</category>
      <category>xslt</category>
      <trackback:ping>http://blog.moertel.com/articles/trackback/672</trackback:ping>
    </item>
    <item>
      <title>"PXSL Tools 1.0: Your ticket out of XML Hell" by Tom Moertel</title>
      <description>&lt;p&gt;hdh, there is not a PXSL mode for Emacs, as far as I know.&lt;/p&gt;


	&lt;p&gt;Writing one would be an interesting exercise.  A simple PXSL mode, supporting only PXSL syntax, would be straightforward to implement.  A more advanced PXSL mode, offering XML editing features within PXSL&amp;#8217;s XML fragments (you can embedd XML in PXSL documents), would be a much more difficult project.&lt;/p&gt;


	&lt;p&gt;If you (or anybody) is interested in writing a PXSL mode, I would be happy to add it to the official PXSL distribution.&lt;code&gt;  ;-)&lt;/code&gt;&lt;/p&gt;


	&lt;p&gt;Cheers,&lt;br /&gt;Tom&lt;/p&gt;</description>
      <pubDate>Mon, 30 Jun 2008 10:21:04 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:455e13b4-d587-41ef-9200-1677a686356b</guid>
      <link>http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell#comment-744</link>
    </item>
    <item>
      <title>"PXSL Tools 1.0: Your ticket out of XML Hell" by hdh</title>
      <description>&lt;p&gt;Hi, is there an emacs mode for PXSL? I see the PXSL page has &amp;#8220;mode: outline&amp;#8221; at the end, but I don&amp;#8217;t see any use for it when editing PXSL.&lt;/p&gt;</description>
      <pubDate>Mon, 30 Jun 2008 04:07:23 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:57f964de-767a-40fd-b0aa-ef928dfb3e54</guid>
      <link>http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell#comment-743</link>
    </item>
    <item>
      <title>"PXSL Tools 1.0: Your ticket out of XML Hell" by Tom Moertel</title>
      <description>&lt;p&gt;Thanks for the kind words, Quark!  You made my day. &amp;#160; &lt;code&gt;:-)&lt;/code&gt;&lt;/p&gt;</description>
      <pubDate>Sun, 20 Apr 2008 10:45:47 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:cf495a0f-a889-4947-a805-7f5f470e1847</guid>
      <link>http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell#comment-719</link>
    </item>
    <item>
      <title>"PXSL Tools 1.0: Your ticket out of XML Hell" by Quark</title>
      <description>&lt;p&gt;1.0!  Lovely :).  I&amp;#8217;ve been a PXSL user for years now.  PXSL is a &lt;em&gt;really&lt;/em&gt; nice language and a &lt;em&gt;really&lt;/em&gt; elegant design.&lt;/p&gt;


	&lt;p&gt;I use it for all web pages I generate from XML, and these days I use it for a fair number of configuration files too (e.g. for OPML for bookmarks).&lt;/p&gt;


	&lt;p&gt;Thanks for the lovely tool Tom.&lt;/p&gt;</description>
      <pubDate>Fri, 18 Apr 2008 18:30:54 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:1df000b7-10f1-4a93-816f-e5051b53a9a8</guid>
      <link>http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell#comment-718</link>
    </item>
    <item>
      <title>"PXSL Tools 1.0: Your ticket out of XML Hell" by defel</title>
      <description>&lt;p&gt;Many thanks for PXSL .. I am using XML and XSL for years, and waited always for something like pxsl, great utility! :)&lt;/p&gt;</description>
      <pubDate>Mon, 04 Feb 2008 04:48:04 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:3c03ddaf-6fc5-4d62-a577-5de1c0ec5541</guid>
      <link>http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell#comment-696</link>
    </item>
    <item>
      <title>"PXSL Tools 1.0: Your ticket out of XML Hell" by Cory von Wallenstein</title>
      <description>&lt;p&gt;Thanks to your tip that I picked up last week, I&amp;#8217;ve found myself requiring my XML validator probably about a quarter as often as I required when I was buried deep in XML Hell. Thanks!&lt;/p&gt;</description>
      <pubDate>Mon, 07 Jan 2008 09:01:08 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:61f1d9cb-f1e0-4256-9a08-0d07962e22c1</guid>
      <link>http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell#comment-683</link>
    </item>
    <item>
      <title>"PXSL Tools 1.0: Your ticket out of XML Hell" by Tom Moertel</title>
      <description>&lt;p&gt;Kristian, the PXSL-to-XML preprocessor is &lt;em&gt;written&lt;/em&gt; in Haskell, but the result is a stand-alone binary &amp;#8211; you don&amp;#8217;t need to learn (or use) Haskell to use it.  If you&amp;#8217;re running Fedora Linux, for example, you can just install one of the &lt;a href="http://community.moertel.com/pxsl/RPMS/"&gt;pxsl-tools RPMs&lt;/a&gt; I&amp;#8217;ve packaged, and you&amp;#8217;ll be ready to roll.  Other folks have contributed binaries for Windows and Mac OS X, but they are a bit out of date.  (Contributions of more-recent versions are welcome.)&lt;/p&gt;</description>
      <pubDate>Sun, 23 Dec 2007 21:09:51 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:55b861d6-aeb4-4d11-bb36-214b6b3a44e7</guid>
      <link>http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell#comment-678</link>
    </item>
    <item>
      <title>"PXSL Tools 1.0: Your ticket out of XML Hell" by Kristian</title>
      <description>&lt;p&gt;That&amp;#8217;s very nice and all (and I remember you espousing PSXL before on HuSi), but what if one isn&amp;#8217;t running Haskell? Any idea how har it would be to wrap this for, say, Python?&lt;/p&gt;</description>
      <pubDate>Sun, 23 Dec 2007 18:56:55 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b57dfe6b-82aa-45e5-8de4-d07d3dbe8d74</guid>
      <link>http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell#comment-677</link>
    </item>
  </channel>
</rss>
