<?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>Jabbering Giraffe &#187; genx</title>
	<atom:link href="http://happygiraffe.net/blog/tag/genx/feed/" rel="self" type="application/rss+xml" />
	<link>http://happygiraffe.net/blog</link>
	<description></description>
	<lastBuildDate>Wed, 19 Oct 2011 10:40:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>XML::Genx 0.22</title>
		<link>http://happygiraffe.net/blog/2006/10/08/xml-genx-0-22/</link>
		<comments>http://happygiraffe.net/blog/2006/10/08/xml-genx-0-22/#comments</comments>
		<pubDate>Sun, 08 Oct 2006 19:18:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[genx]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2006/10/08/xml-genx-0-22/</guid>
		<description><![CDATA[I&#8217;ve released XML::Genx 0.22. There are no functional changes, just a couple of minor bugfixes in order to ensure that it works on Windows correctly. For some time now, I&#8217;d been trying to get XS modules compiling on Windows correctly &#8230; <a href="http://happygiraffe.net/blog/2006/10/08/xml-genx-0-22/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve released <a href="http://search.cpan.org/~hdm/XML-Genx-0.22/"><span class="caps">XML</span>::Genx 0.22</a>.  There are no functional changes, just a couple of minor bugfixes in order to ensure that it works on Windows correctly.</p>
<p>For some time now, I&#8217;d been trying to get XS modules compiling on Windows correctly under ActiveState Perl, all to no avail.  But now, thanks to the wonder of <a href="http://win32.perl.org/wiki/index.php?title=Strawberry_Perl">Strawberry Perl</a>, I&#8217;ve actually been able to build and test the module all on my own.  I am hugely grateful to the authors for putting together Strawberry Perl.  It&#8217;s a huge boon for developing Perl on Windows (Not that I diss ActiveState; they&#8217;ve also done a good job, but they&#8217;ve gone in different directions).</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2006/10/08/xml-genx-0-22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML::Genx 0.21</title>
		<link>http://happygiraffe.net/blog/2006/06/08/xml-genx-0-21/</link>
		<comments>http://happygiraffe.net/blog/2006/06/08/xml-genx-0-21/#comments</comments>
		<pubDate>Thu, 08 Jun 2006 07:12:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[genx]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2006/06/08/xml-genx-0-21/</guid>
		<description><![CDATA[I&#8217;ve released a new version, which fixes a blindingly obvious error: you couldn&#8217;t pass in characters between \x80 and \xff unless they had the UTF-8 flag turned on. I don&#8217;t know how I missed that. XML::Genx 0.21]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve released a new version, which fixes a blindingly obvious error: you couldn&#8217;t pass in characters between \x80 and \xff unless they had the UTF-8 flag turned on.  I don&#8217;t know how I missed that.  <img src='http://happygiraffe.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<ul>
<li><a href="http://search.cpan.org/~hdm/XML-Genx-0.21/"><span class="caps">XML</span>::Genx 0.21</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2006/06/08/xml-genx-0-21/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML::Genx 0.20</title>
		<link>http://happygiraffe.net/blog/2006/02/04/xml-genx-0-20/</link>
		<comments>http://happygiraffe.net/blog/2006/02/04/xml-genx-0-20/#comments</comments>
		<pubDate>Sat, 04 Feb 2006 10:40:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[genx]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2006/02/04/xml-genx-0-20/</guid>
		<description><![CDATA[I pushed out a new release of XML::Genx last night. Nothing worth upgrading for, it just fixes a few compiler warnings under gcc 4.0. Thankfully, after some sage advice from Daniel Jalkut, I managed to get rid of the warnings &#8230; <a href="http://happygiraffe.net/blog/2006/02/04/xml-genx-0-20/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I pushed out a new release of <a href="http://search.cpan.org/~hdm/XML-Genx-0.20/"><span class="caps">XML</span>::Genx</a> last night.   Nothing worth upgrading for, it just fixes a few compiler warnings under gcc 4.0.  Thankfully, after some sage advice from <a href="http://www.red-sweater.com/blog/95/a-word-of-caution">Daniel Jalkut</a>, I managed to get rid of the <a href="http://happygiraffe.net/blog/archives/2006/01/24/xml-genx-compiler-warnings">warnings I was complaining about</a>.  Unfortunately, there&#8217;s still one warning coming out. But it&#8217;s in code that is entirely generated by xsubpp, so there&#8217;s not a lot that I can do about it.  Ah well.</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2006/02/04/xml-genx-0-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML::Genx Compiler Warnings</title>
		<link>http://happygiraffe.net/blog/2006/01/24/xml-genx-compiler-warnings/</link>
		<comments>http://happygiraffe.net/blog/2006/01/24/xml-genx-compiler-warnings/#comments</comments>
		<pubDate>Tue, 24 Jan 2006 00:29:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[genx]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2006/01/24/xml-genx-compiler-warnings/</guid>
		<description><![CDATA[Naturally, one of the first things I did when I got the new mac was to try compiling my software, XML::Genx, on it. Sadly, it throws up a number of errors. Genx.xs: In function 'string_sender_write': Genx.xs:209: warning: pointer targets in &#8230; <a href="http://happygiraffe.net/blog/2006/01/24/xml-genx-compiler-warnings/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Naturally, one of the first things I did when I got the new mac was to try compiling my software, <a href="http://search.cpan.org/dist/XML-Genx"><span class="caps">XML</span>::Genx</a>, on it.  Sadly, it throws up a number of errors.</p>
<pre>
Genx.xs: In function 'string_sender_write':
Genx.xs:209: warning: pointer targets in passing argument 3 of 'Perl_sv_catpv' differ in signedness
Genx.xs: In function 'string_sender_write_bounded':
Genx.xs:223: warning: pointer targets in passing argument 3 of 'Perl_sv_catpvn_flags' differ in signedness
Genx.xs: In function 'XS_XML__Genx_ScrubText':
Genx.xs:606: warning: pointer targets in passing argument 2 of 'genxScrubText' differ in signedness
Genx.xs:606: warning: pointer targets in passing argument 3 of 'genxScrubText' differ in signedness
Genx.c: In function 'XS_XML__Genx__Namespace_GetNamespacePrefix':
Genx.c:1068: warning: pointer targets in passing argument 3 of 'Perl_sv_setpv' differ in signedness
</pre>
<p>Looking around the web, it appears that this is a new warning in gcc 4.0.  It also baffles me that that apple would have considered using signed characters for anything by default.  However, the obvious fix doesn&#8217;t work.</p>
<pre>
-        sv_catpv( *svp, s );
+        sv_catpv( *svp, (signed char *)s );
</pre>
<p>At this point, I suspect that my knowledge of C is fundamentally lacking.  Does anybody out there have any ideas what I need to do to fix this warning?  The source is <code>string_sender_write()</code> in <a href="http://search.cpan.org/src/HDM/XML-Genx-0.19/lib/XML/Genx.xs">Genx.xs</a>, although you&#8217;ll probably also want <a href="http://search.cpan.org/src/HDM/XML-Genx-0.19/src/genx.h">genx.h</a> to look for the typedefs.</p>
<p>Sadly, the gcc manual doesn&#8217;t have much to say, except to note the existence of <a href="http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/Warning-Options.html#index-Wno_002dpointer_002dsign-292">-Wno-pointer-sign</a> to disable the warning.  But I&#8217;d rather fix it if I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2006/01/24/xml-genx-compiler-warnings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>new XML::Genx</title>
		<link>http://happygiraffe.net/blog/2005/10/17/new-xml-genx/</link>
		<comments>http://happygiraffe.net/blog/2005/10/17/new-xml-genx/#comments</comments>
		<pubDate>Mon, 17 Oct 2005 07:38:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[genx]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2005/10/17/new-xml-genx/</guid>
		<description><![CDATA[XML::Genx 0.19 is now out. Changes include: Allow namespace objects to be passed in to StartElementLiteral() and AddAttributeLiteral(). This makes it much easier to put things into the default namespace. Add a missing &#8220;static&#8221; declaration to some XS helper functions. &#8230; <a href="http://happygiraffe.net/blog/2005/10/17/new-xml-genx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://search.cpan.org/~hdm/XML-Genx-0.19/"><span class="caps">XML</span>::Genx 0.19</a> is now out.  Changes include:</p>
<ul>
<li>Allow namespace objects to be passed in to StartElementLiteral() and AddAttributeLiteral().  This makes it much easier to put things into the default namespace.</li>
<li>Add a missing &#8220;static&#8221; declaration to some XS helper functions.</li>
<li>Allow multiple different default namespaces inside <span class="caps">XML</span>::Genx::SAXWriter.  Previously you would get a &#8220;Duplicate Prefix&#8221; error.  Bug spotted by Aristotle Pagaltzis.</li>
<li>Make the tests work in perl 5.6.1.  Not sure when I broke this.</li>
</ul>
<p>I deliberately left out the <span class="caps">SAX</span> changes that Aristotle was talking about on the list, as I wanted some more feedback.  I&#8217;ll do another new release in a few days if nobody has said anything.</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2005/10/17/new-xml-genx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML::Genx</title>
		<link>http://happygiraffe.net/blog/2005/10/15/xml-genx/</link>
		<comments>http://happygiraffe.net/blog/2005/10/15/xml-genx/#comments</comments>
		<pubDate>Sat, 15 Oct 2005 19:42:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[genx]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2005/10/15/xml-genx/</guid>
		<description><![CDATA[Aristotle Pagaltzis has mentioned XML::Genx. Yay, it needs all the publicity that it can get. He highlighted some issues in XML::Genx::SAXWriter, which I need to address, although getting some consensus from the list first would be good. He also mentions &#8230; <a href="http://happygiraffe.net/blog/2005/10/15/xml-genx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://plasmasturm.org/">Aristotle Pagaltzis</a> has <a href="http://aspn.activestate.com/ASPN/Mail/Message/Perl-XML/2858464">mentioned</a> XML::Genx.  Yay, it needs all the publicity that it can get.  He highlighted some issues in <span class="caps">XML</span>::Genx::SAXWriter, which I need to address, although getting some consensus from the list first would be good.</p>
<p>He also mentions a problem with <a href="http://aspn.activestate.com/ASPN/Mail/Message/perl-xml/2858721">default namespaces</a> a little further on.  I&#8217;ll have to look into that one.  I&#8217;m not sure if it&#8217;s a bug or Genx is supposed to work that way.</p>
<p>But it has made me realise that I need to upgrade the documentation that comes with Genx.  The <span class="caps">API</span> usage is not always as clear as it could be, particularly when it comes to namespaces and optional function arguments.  So a very good <span class="caps">EXAMPLES</span> section would do well I think.</p>
<p>Not only that, it&#8217;s also made realise that there&#8217;s some bad behaviour in there.</p>
<ol>
<li>Passing in a namespace object to <code>StartElementLiteral()</code> doesn&#8217;t work properly.  It assumes that the stringification of the namespace object is the <span class="caps">URL</span>.</li>
<li>The manner for using <code>StartElementLiteral()</code> to declare a default namespace sucks, badly.  You have to declare the namespace object with the default prefix (<em>ie</em>: &#8221;&#8221;).  Then, you have to call <code>StartElementLiteral()</code> passing in the <span class="caps">URI</span> yourself.  And then you have to call <code>AddNamespace()</code> on the namespace object to switch from the genx created prefix back to the default.  Very weird, but fixing the bug above would render this much simpler.</li>
</ol>
<p>It&#8217;s really important to get this sort of thing fixed up so that the <span class="caps">API</span> is easy to use and works as expected.</p>
<p>Finally, I&#8217;ve also noticed that the last release had an unexpected <a href="http://www.nntp.perl.org/group/perl.cpan.testers/259092">failure</a> (the Win32 stuff is at least <em>expected</em> failure).  What&#8217;s irritating is that it&#8217;s nothing to do with my code.  For some reason, version.xs is being picked up and mingled into my module.  I blame the person submitting the <span class="caps">CPAN</span> tester report (for now, anyway).  I&#8217;m sure I saw something about this on a <a href="http://use.perl.org/">use.perl.org</a> journal recently&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2005/10/15/xml-genx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jenx</title>
		<link>http://happygiraffe.net/blog/2005/10/03/jenx/</link>
		<comments>http://happygiraffe.net/blog/2005/10/03/jenx/#comments</comments>
		<pubDate>Mon, 03 Oct 2005 11:53:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[genx]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2005/10/03/jenx/</guid>
		<description><![CDATA[Recently, in yet another fit of distraction from my existing projects, I&#8217;ve started working on jenx. It&#8217;s an XML writer for Java along similiar lines to GenX. At the moment, I&#8217;m just at the stage of banning invalid characters that &#8230; <a href="http://happygiraffe.net/blog/2005/10/03/jenx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently, in yet another fit of distraction from my existing projects, I&#8217;ve started working on <a href="http://happygiraffe.net/trac/browser/jenx/trunk/">jenx</a>. It&#8217;s an <span class="caps">XML</span> writer for Java along similiar lines to <a href="http://www.tbray.org/ongoing/When/200x/2004/02/20/GenxStatus">GenX</a>.  At the moment, I&#8217;m just at the stage of banning invalid characters that go through it.  So it&#8217;s extremely fortuitous that I&#8217;ve just seen a link to <a href="http://hsivonen.iki.fi/producing-xml/"><span class="caps">HOWTO</span> Avoid Being Called a Bozo When Producing <span class="caps">XML</span></a>.</p>
<p>I&#8217;ve mostly been basing it on the GenX source code and it&#8217;s certainly made me realise quite how complicated a job it is to produce well-formed <span class="caps">XML</span> reliably.  In particular, namespaces add a very large amount of complexity.</p>
<p>This just underlines how important it is to have good libraries to produce this sort of thing.</p>
<p>Hmmm, looking through that <span class="caps">HOWTO</span> makes me realise that I need to check that <a href="http://search.cpan.org/dist/XML-Genx/"><span class="caps">XML</span>::Genx</a> correctly supports astral characters.  I&#8217;m sure it does, but I&#8217;d better double check in a test&#8230;  For that matter, does Perl support them?</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2005/10/03/jenx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML::Genx Exceptions</title>
		<link>http://happygiraffe.net/blog/2005/03/02/xml-genx-exceptions/</link>
		<comments>http://happygiraffe.net/blog/2005/03/02/xml-genx-exceptions/#comments</comments>
		<pubDate>Wed, 02 Mar 2005 21:48:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[genx]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2005/03/02/xml-genx-exceptions/</guid>
		<description><![CDATA[I came across an interesting situation today. The exception thrown by XML::Genx showed up in completely the wrong place. I suspect that this is due to the fact that I&#8217;ve made it a dual valued scalar and Perl doesn&#8217;t want &#8230; <a href="http://happygiraffe.net/blog/2005/03/02/xml-genx-exceptions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I came across an interesting situation today.  The exception thrown by <span class="caps">XML</span>::Genx showed up in completely the wrong place.  I suspect that this is due to the fact that I&#8217;ve made it a dual valued scalar and Perl doesn&#8217;t want to overwrite by appending &#8220;at Foo.pm line 23&#8221; to the end of it.  More investigation required.</p>
<p>Further investigation shows that it&#8217;s because I was using the &#8220;object&#8221; form of <code>croak()</code>, so Perl didn&#8217;t dare touch what I was doing.  Doh.  So I&#8217;ve now simplified things so that it works correctly.  <a href="http://search.cpan.org/~hdm/XML-Genx-0.12/"><span class="caps">XML</span>::Genx 0.12</a> is now up.</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2005/03/02/xml-genx-exceptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML::Genx</title>
		<link>http://happygiraffe.net/blog/2005/02/18/xml-genx-2/</link>
		<comments>http://happygiraffe.net/blog/2005/02/18/xml-genx-2/#comments</comments>
		<pubDate>Fri, 18 Feb 2005 09:23:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[genx]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2005/02/18/xml-genx-2/</guid>
		<description><![CDATA[After months of neglect, I&#8217;ve picked up on XML::Genx again. One &#8220;A. Pagaltzis&#8221; wrote to me and made two suggestions. Firstly, why didn&#8217;t I wrap genxScrubText() and secondly why didn&#8217;t have a method for automatically creating XML output as a &#8230; <a href="http://happygiraffe.net/blog/2005/02/18/xml-genx-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After months of neglect, I&#8217;ve picked up on <a href="http://search.cpan.org/dist/XML-Genx/"><span class="caps">XML</span>::Genx</a> again.  One &#8220;A. Pagaltzis&#8221; wrote to me and made two suggestions.  Firstly, why didn&#8217;t I wrap <code>genxScrubText()</code> and secondly why didn&#8217;t have a method for automatically creating <span class="caps">XML</span> output as a string since that&#8217;s such a common use case.</p>
<p>Well, I tried the first one and got very frustrated by XS and its little foibles.  So I left the whole project alone for a while.</p>
<p>But last night, I started working on the string appender.  And it was actually much easier than I thought.  Not only that, it gave me the idea for making the internals much better and cleaner.  At the moment I have an internal global hash, because I can&#8217;t store things in <code>$self</code> like normal Perl OO code (because <code>$self</code> is a blessed scalar point at a <a href="http://www.tbray.org/ongoing/genx/docs/Guide.html#genxWriter">genxWriter</a> instead.  But genxWriter takes a user pointer, so I can just stick the hash in there.  I shoulda thought of that ages ago.</p>
<p>So, one new release today and a cleanup release <span class="caps">RSN</span> to rework the internals around user data a bit better.  And then I&#8217;ll get back to <code>genxScrubText()</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2005/02/18/xml-genx-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

