Jonathan Vanasco | 3 May 19:51

omit-tag -- Petal DOCUMENTATION inconsistency with TAL spec


I just learned this on another TAL list...

regarding omit-tag, the TAL spec states

	If the expression evaluates to a true value, *** or there is no  
expression ***

ie: no conditional/statement is interpreted as true

whereas the Petal implementation states:

	If you want to ALWAYS remove a tag, you can use omit-tag="string:1"

The petal behavior should be

	If you want to ALWAYS remove a tag, you should use omit-tag=""

It looks as if this was implemented in v1.06  -- but the docs were  
never updated to reflect the correct behavior.

Peter Rabbitson | 23 May 16:32
Picon

Petal alters XML as if it is XHTML

Hi,
I might be doing something wrong, but when explicitly feeding XML and 
outputting XML, the result has all self closing tags (e.g. <br />) split 
into two tags (e.g. <br></br>). How can I stop this from happening?

Here is a simple test script:

==============================================================
use warnings;
use strict;

use File::Spec::Functions qw/splitpath/;
use File::Temp ();
use Petal;

print "====\n$Petal::VERSION\n====\n\n";

my $fh = File::Temp->new or die "$@\n";

print $fh <<'EOD'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<meta name="generator" content="vi" />
		<title>Test Page</title>
	</head>
(Continue reading)


Gmane