in reply to Re^2: Thinking Aloud About HTML::Template
in thread Thinking Aloud About HTML::Template

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.

  • Comment on Re^3: Thinking Aloud About HTML::Template

Replies are listed 'Best First'.
Re^4: Thinking Aloud About HTML::Template
by Cody Pendant (Prior) on Aug 02, 2004 at 02:05 UTC
    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

      Since the special attributes used by Petal are in their own namespace, it would be pretty easy to strip them out before submitting the template to a validator. But it's rather a bogus argument since the thing you want to validate is the output from a template processor, not the input. I recommended Petal because in my experience it plays nicely with GUI authoring tools.