Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

2shortplanks (968)

  (email not shown publicly)
AOL IM: trelane2sp (Add Buddy, Send Message)
Yahoo! ID: trelane2sp (Add User, Send Message)

Mark Fowler has never been the same since he was elected leader of the London Perl Mongers. The strain manifests itself mainly in releasing various [] modules [] to CPAN, giving talks [], and use of the Trelane nick on for endless procrastination. Doctors are still seeking a cure.
Monday May 05, 2003
06:16 AM

Me So Stoopid (part one of many)

[ #12008 ]
I hate it when you've spent weeks tracking down a bug, and then (and only then) do you realise how stupid you've been.

I've been using XML::SAX::Writer to spit out some XML, and I couldn't work out why the prefix wasn't getting written on the start element. In the end I extracted out a small bit code and made a test case that continued to fail. The prefix and namespace are quite long and hence were defined as constants at the top of the script. Just before I was about to mail the perl-xml list shouting BUG! BUG! I decided I'd better shorten this prefix and uri to something a couple of chars long so I can format the xml the writer spits out in 78 chars easily.

And then it starts working.

Like a bolt of lightning I suddenly realise that the prefix was starting with 'xml', which of course is reserved in the spec. You can't start tag names with xml. Of course, I hadn't noticed it as I'd been spending the whole time staring at the code that was creating the tag which had constants like PREFIX and NAMESPACE rather than the actual values.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.