Hi,

Quickbook now generates clean, well formatted XML output.
Why is that important? Read on...

Had an itch yesterday to do some Quickbook coding. I'd rally wanted
to go on with the quickbook preprocessor, especially the parametric
macros facility. I was quite worried though because there is no
regression testing for Quickbook. I feel like walking the high
wire without a safety net. I fear that more coding has the potential
of wreaking havoc to backwards compatibility and I won't settle
fo anything less than 100% backward compatibility. A lot of people
have already invested in churning out qbk files.

So, how do you provide regresion testing for quickbook. After
thinking about it and after consultation with Eric Niebler and
Joao Abecasis, the only way is to test the output against a
stable benchmark. Alas, file compare/diff won't work. XML
formatting should not matter. In certain places, white space
does not matter, in certain places they do. I figured the only
reliable way is to use something like HTMLTidy to transform the
XML in a normalized canonical form. Alas, although HTMLTidy can
accept XML files, it does not honor <programlisting>. It is
possible to test the generated HTML after HTMLTidying them but
boostbook places some generated IDs which can change per session.

So, now, I hacked in a quickbook specific XML tidy routine into
the application. Looking at the generated quickbook.xml, I was
very pleased. Amazing beautiful xml code!

Enjoy!

Regards,
--
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Boost-docs mailing list
[email protected]
Unsubscribe and other administrative requests: 
https://lists.sourceforge.net/lists/listinfo/boost-docs

Reply via email to