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 ]

Shlomi Fish (918)

Shlomi Fish
AOL IM: ShlomiFish (Add Buddy, Send Message)
Yahoo! ID: shlomif2 (Add User, Send Message)

I'm a hacker of Perl, C, Shell, and occasionally other languages. Perl is my favourite language by far. I'm a member of the Israeli Perl Mongers, and contribute to and advocate open-source technologies. Technorati Profile []

Journal of Shlomi Fish (918)

Tuesday August 22, 2006
01:44 PM

XML::LibXML::Dtd tip

[ #30723 ]

I've been stumped on an obscure problem while using XML-LibXML's XML::LibXML::Dtd. When trying to slurp the text of the DTD and call XML::LibXML::Dtd->parse_string as documented in the POD document, it still emitted an error. Now, I was including some DTD modules using the SYSTEM directive inside the DTD.

As it turns out I should have done this to start with:

my $dtd =
"Products Syndication Markup Language 0.1.1",

Call XML::LibXML::Dtd->new() with the docstring and the URL to the DTD. After I changed the code to using it everything worked fine. Problem is it is not documented anywhere in the POD. Guess I'll have to file a (yet another) XML::LibXML bug and attach a patch to the POD. <sigh /> - more work to do.

On a slightly differnet note if you want to learn XSLT, start at the W3Schools XSLT Tutorial (which is short and doesn't cover a lot of stuff, but still good) and proceed to the Zvon XSLT Tutorial (which covers almost everything, but requires some basic understanding.). Right now, I'd like to write an XSLT stylesheet (after I finish with the DTD), and these two tutorials finally caused the XSLT coin to fall.

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.