Perrin Harkins wrote:

On Mon, 2004-03-15 at 13:53, Myk Melez wrote:


But maybe all this doesn't matter. Maybe validators do well enough
with non-document snippets of HTML and the drawbacks to making
everyone know TT are outweighed by the benefit of doing things the TT
way (or there's a better way that resolves this conflict). Thoughts?



It's the same story with any templating system: you can reduce duplication, but then your source files are no longer just HTML. In practice, this is better than the alternative, which is massive duplication and manual labor. You can still run a validator on your generated HTML, just not on your source templates


The trick, IMHO, is to rig validator templates that ensure your fractional HTML is valid. You need to define the context that templates will appear in: (wrapped in body, wrapped in table..td, wrapped in form..table..td, etc.) Raw data fields need to be validated as proper inline content. I've got some simple templates that literally consist of nothing more than html and body tags or that plus a single table row and td. The minimum necessary to feed it to a validator like LibXML.


Sadly, a full implementation requires a much larger investment of resources and back-end work than I've seen anyone be willing to exert. It needs a complete content management strategy and branch-verifiable templates. Evil, evil stuff. And being both a validation Nazi and end-user flexible means tons of corner cases. Bleagh.

--mark

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to