Hello!

I've made some searching and it seems we can use xmllint as an
alternative for digging detailed error messages in configure.php.
Advantages:
- it seems to be a bit faster
- memory limit (if exceeded xmllint exits and don't hang your system)
- validation check on the fly and after the full document is built
(--valid and --postvalid options)
- more debugging features (--load-trace shows included files,
--debugent full path of xml processing)
- interactive shell? (didn't use it yet though)

Usage example:
c...@conf ~/phpdoc-ru/doc-base $ xmllint --noout --stream --valid
--postvalid --noent manual.xml
(--noent option will substitue entities, more memory consuming and
exact validation, --stream uses streaming API, helps for big files)

Use man xmllint for details.

Problems:
- I had to modify docbook.dtd to make xmllint handle xi:includes
correctly, afaik they are used only in classsynopsis so there're
minimum changes in dtd, here's the patch: http://pastie.org/1433965
- --postvalid and --noent options quite enlarge memory usage,
(according to top output) up to 1Gb, while without them it's about
200Mb
- don't know how to use with non-en manual versions

What do you think about it?

-- 
Regards,
Shein Alexey

Reply via email to