Log in

No account? Create an account
Tech Tip: Caching the XHTML DTDs - Shlomif's Technical Posts Community [entries|archive|friends|userinfo]
Shlomif's Technical Posts Community

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Links:| Shlomi Fish's Homepage Main Journal Homesite Blog Planet Linux-IL Amir Aharoni in Unicode open dot dot dot ]

Tech Tip: Caching the XHTML DTDs [Apr. 16th, 2011|11:09 pm]
Shlomif's Technical Posts Community


[Tags|, , , , , ]
[Current Location |Home]
[Current Mood |calmcalm]
[Current Music |Juicebox Assassins - "Fireflies" Cover (from YouTube)]

Some days ago I needed to speed up validating an XHTML document (the module XHTML 1.1) based on the DTDs provided by the W3C, so I sought a way to cache them on the disk. Problem is I could not effectively download them from the W3C because their download speed was throttled.

Eventually, the Gentoo Wiki's “W3C Validator HOWTO” document provided some insights. Just download http://validator.w3.org/sgml-lib.tar.gz, unpack it, cd to its directory and do export XML_CATALOG_FILES="$(pwd)/catalog.xml" to set the XML catalogue appropriately. It's too bad I could not find a Mandriva Linux package for that.

Anyway, after I did that, the validation and other XML processing worked nicely.