On 7/5/07, Ian Bicking <[EMAIL PROTECTED]> wrote: > > Jonas wrote: > > = Conclusion = > > > > Though Pylons has choosed a text-based template engine by default it > > doesn't mean that it should be valid for everything. > > > > The speed is not so important, it is more important to get a well > > formed output for HTML/XML.
A well-formed template doesn't necessarily mean the output is well-formed, especially if HTML markup is inserted via placeholder variables. Sometimes the source is legacy data or outside your control. I tried to use Genshi in my last project to get the well-formed template benefit, but I had too many unanswered questions that weren't addressed by the documentation, existing Pylons examples, or the Genshi list. I gave up and went back to Mako because it's well documented, you get immediate answers on the list, the list has a good sense of Pylons' users specific needs, and it "just works". I still like Genshi and would like to try it again, but only after it has gotten some more use under Pylons and some "best practices" have emerged (especially regarding site templates, match templates, etc). > You can also use egg:Paste#wdg_validate to run validation on all output > pages. The WDG validator isn't the best validator, but another > validator could be written easily enough. Ideally it would also have a > "strict" mode that would signal an error. I tried this and a couple other validators a few months ago, and found they each depended on several C and/or Perl components that were difficult to install. I looked for a pure Python validator or at least the raw rulesets that would match the W3C validator's completeness but didn't find any. I thought about writing a validator using W3C's as a web service, and I may still someday, but it does require a network connection just to validate, which would be a problem in an automated test suite. So I validate by having somebody interactively submit the pages to W3C's validator, which is inefficient but better than nothing. So Pylons still needs a good validating middleware that doesn't depend on C/Perl/network components. -- Mike Orr <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
