On 11/14/07, Jim Wilson wilson.jim.r@gmail.com wrote:
Templates complicate the "is this valid" test. Multiple templates can contain invalid syntax which when used together form proper syntax.
I don't think there's any question that templates will continue to be parsed by a preprocessor. Just like in C, there's really no way to do a one-pass parse if elements can expand to literally anything.
So where do you place the validation logic? If you validate the
Template pages themselves, they'll fail - so do you omit Templates from conformance? If so, what about transcluding pages from other Namespaces?
I'm not sure where all this discussion about a validator came from. The answer seems obvious though: don't validate template text, and validate a page after transcluding and parsing.
The discussion of error messages is a bit misplaced though - the parser could generate helpful information which the skin could display in a useful way as a warning to the user. I don't think you'd consider them error messages though.
Consider this: '''Some bold''' and then '''' what?
The three apostrophes at the end aren't an error. Nor does the parser really know what to do with them, so it'll guess (render literally) and warn.
Steve