in reply to Thinking Aloud About HTML::Template

I'm a heavy user of HTML::Template and have entertained some of the same concerns about validation as you. However, it is only as a purist that I want it to validate before the page is rendered in the browser. Of course, when the page is actually visited, all H::T coding is gone, and is basically valid at that point. So, my question: is it worth reworking H::T, or even switching to a new system, just to satisfy my purist leanings? In an ideal world, maybe 'yes', but in a more practical one, I have to be profitable.

Anyway, great mediation—one that I have not thought that thoroughly about.

—Brad
"Don't ever take a fence down until you know the reason it was put up. " G. K. Chesterton
  • Comment on Re: Thinking Aloud About HTML::Template

Replies are listed 'Best First'.
Re^2: Thinking Aloud About HTML::Template
by Cody Pendant (Prior) on Aug 02, 2004 at 01:23 UTC
    Thanks everyone for your thoughts and suggestions.

    I took a look at Petal, which I don't think exactly meets the brief as it uses non-valid attributes, but Seamstress (a word I haven't heard since "Tiny Dancer" incidentally) would appear to be roughly what I had in mind.



    ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
    =~y~b-v~a-z~s; print
      I took a look at Petal, which I don't think exactly meets the brief as it uses non-valid attributes

      What's the problem with non-valid attributes? A web browser that doesn't recognise an attribute will ignore it - exactly what you want. The great thing about Petal is that you can put realistic dummy content within the tags in your template. When Petal runs, it replaces the content from the template with the data from your script. But if you view the template directly in a browser or a WYSIWIG HTML authoring tool, the dummy content will be displayed instead.

        What's the problem with non-valid attributes? A web browser that doesn't recognise an attribute will ignore it - exactly what you want.

        In a word, "validation". A web-developer doesn't want to validate a document and skip 43 "invalid attribute" warnings.

        Also you might want to use XHTML, where invalid code would choke an XML Parser or an XSLT transformation entirely.

        My point about Seamstress is that it uses valid attributes, that is, the "ID" attribute, to do the same thing. Unless I totally missed the point in my quick look.



        ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
        =~y~b-v~a-z~s; print