[Petal] Problems with HTML Parser

Jean-Michel Hiver jhiver@mkdoc.com
Thu, 8 Aug 2002 12:28:17 +0100


> For example, if my CSS def'n is as follows:
> 
>             .head {
>                 font-size: 1.1em;
>                 font-weight: bold;
>                 font-family: "arial";
>             }
> 
> 
> When Petal interprets it, I get:
> 
>             .head {
>                 font-size: 1.1em;
>                 font-weight: bold;
>                 font-family: "arial";
>             }

That's obviously a bug. On my TODO list.


> Is this a problem with HTML::TreeBuilder or Petal? Also, my link tag to 
> include an external CSS stylesheet is being transformed from:
> 
>     <link href="../qns.css" type="text/css" rel="stylesheet" />
> 
> to:
>     <link href="../qns.css" type="text/css" rel="stylesheet"></link>

Mhhh... interesting issue. I've ask some of my workmates XHTML
specialists to reply to list about it, that's something that I'll need
to seriously think about... So many bugs to fix!

I think in the near future Petal is going to feature pluggable
canonicalizers... The current one is going to be renamed
Petal::Canonicalizer::XML and I'll write a Petal::Canonicalizer::XHTML.

There will be an extra global variable for the output.

As I'm writing this I realize that maybe the $Petal::PARSER should
perhaps be renamed $Petal::INPUT.

Then you'd do something like.

$Petal::INPUT  = 'HTML';
$Petal::OUTPUT = 'XHTML';

I'm thinking of loosing the 'ANY' which does not make much sense. By
default, petal would be set as follow:

$Petal::INPUT  = 'XML';
$Petal::OUTPUT = 'XML';

Because by default Petal should be able to template all kinds of XML
(Voice XML, RDF, RSS, SVG...) and not just HTML.

Cheers,
-- 
IT'S TIME FOR A DIFFERENT KIND OF WEB
================================================================
  Jean-Michel Hiver - Software Director
  jhiver@mkdoc.com
  +44 (0)114 255 8097
================================================================
                                      VISIT HTTP://WWW.MKDOC.COM