in reply to Automatic XML builds

I'm not sure I understood your question... You talk about building XML documents and then about Schema, but Schema is intended to validate documents...
Anyway, if you need to validate some XML against a schema, there is XML::Schematron, which uses Sablotron or LibXSLT.

Ciao, Valerio