views:

332

answers:

1

I'm trying to validate using libxml-ruby's DTD#validate, but I keep getting the following warnings:

Warning: failed to load external entity "xhtml-lat1.ent" at :29.
Warning: failed to load external entity "xhtml-symbol.ent" at :34.
Warning: failed to load external entity "xhtml-special.ent" at :39.

I wouldn't mind, except I use things like …, which are defined in those, causing my XHTML to appear to be invalid.

How do I tell the DTD about those extra files? I tried running from a directory containing the .dtd file and all of the .ents, but that doesn't help.

A: 

Reading the release notes I would suspect that you need to either use

XML.default_substitute_entities = true

or

XML.default_load_external_dtd = true

or both.

Nic Gibson
I'm having similar issues, and these options don't seem to have much (any?) effect.
James Healy
Apologies - I'm not much of a ruby person (I'm an xml person). The docs seem to be particularly poor for libxml-ruby so I can't be of any more help
Nic Gibson