[Petal] Petal 0.80 released

Jean-Michel Hiver jhiver@mkdoc.com
Wed, 11 Dec 2002 14:54:18 +0000


Hi Folks,

1. Bad news
-----------

The number jumped directly to 0.80 because (bad news ahead...) this
release DOES BREAK BACKWARDS COMPATIBILITY !!!!

All the processing instructions which were <?petal:something ...> are
now written as <?something ... ?>.

So Why? Why? WHY? you ask.

Well, since XML namespace support has been implemented I discovered that
XML processing instructions are not meant to support namespaces. XML
namespace support lets you use the prefix which you want... if you don't
like using 'petal:' you can use something else, i.e. 'FOO:' for example by
declaring:

<xml FOO:xmlns="http://purl.org/petal/1.0/">
  <sometag FOO:replace="somevalue">Hello</sometag>
</xml>

BUT if you wanted to use processing instructions, you would have had to say:

<xml FOO:xmlns="http://purl.org/petal/1.0/">
  <sometag FOO:replace="somevalue">Hello</sometag>
  <?petal:var name="somevalue"?>
</xml>

Which would be very confusing... This is because processing instructions
have nothing to do with namespaces, as I said.

So instead of doing that, you would now write:

<xml FOO:xmlns="http://purl.org/petal/1.0/">
  <sometag FOO:replace="somevalue">Hello</sometag>
  <?var name="somevalue"?>
</xml>


2. Good news
------------

TAL's on-error statement has been implemented, so you can catch errors
rather than dying...

<html petal:on-error="string: Ooops, somthing bad happened">
  ...
  blah blah blah...

  <p petal:on-error="string: this paragraph is buggy">
    <span petal:replace="this/is/likely/to/fail">Foo</span>
  </p>
</html>

Petal supports now all the TAL statements... hence I think it complies
with the TAL spec. Plus all the extra syntaxic options it provides.


3. Documentation
----------------

Although I have massively revamped the POD documentation, I am still
very unhappy about it (so you can expect it to be changed some more). If
you have any suggestion on how to structure it, make it easier to
understand or anything useful to contribute, go ahead!

The new module should be on CPAN shortly.
Enjoy!

-- 
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
jhiver@mkdoc.com  - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/