DTD parser?

Nic Gibson nicg at noslogan.org
Fri Jun 1 22:04:13 BST 2007

On Jun 1, 2007, at 21:18, Andy Armstrong wrote:

> On 1 Jun 2007, at 21:01, Nic Gibson wrote:
>>> The overall aim is to build HTML::Tiny::Strict as a validating  
>>> version of HTML::Tiny. I'd like to generate the data  
>>> automatically from the DTDs.
>> Off the top of my head, I wonder if Norm Walsh's dtdparse might  
>> help - http://nwalsh.com/perl/dtdparse/
> I think that's what SGML::DTDParse is - which /does/ parse the DTD  
> properly. So yes. Now I just have to parse the XML it generates :)

Yup. That would be true - I've never needed to particularly combine  
the perl stuff I do and the DTD stuff I do so I never noticed.

There's another utility that could be written to complement the  
existing set that does what you need I reckon. Something to walk the
database that dtdparse outputs and build a sensible data structure  
showing all the valid paths. Which sounds like a dead interesting
project which is annoying as I'm spending the weekend learning  
RelaxNG and Schematron properly so I can talk sense about DocBook 5
when I start working for Penguin on Monday morning.



> -- 
> Andy Armstrong, hexten.net

More information about the london.pm mailing list