httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaqui Greenlees <jaqui_greenl...@yahoo.ca>
Subject Re: [users@httpd] How to build layers/filters with Apache and PHP
Date Wed, 26 Apr 2006 15:21:50 GMT

--- Nick Kew <nick@webthing.com> wrote:

> On Wednesday 26 April 2006 11:06, Gioele Barabucci
> wrote:
> > Hello,
> >
> > I have and unmodifiable PHP application that runs
> on an apache installation. 
> 
> > I would like to create a chain like this:
> > | request -> get.php -> validator.php -> output
> 
> I don't believe you can do that (though there are
> snake-oil
> scripts floating around that claim to validate). 
> You can come
> pretty close to validating by passing the output
> through a
> DTD-based filter: for example
> http://apache.webthing.com/mod_publisher/dtd.html
> 
> > With J2EE this was simple because you could stack
> one filter upon another
> > without too much hassle. Is there something
> similar for Apache/PHP?
> 
> See above.  Apache, yes.
> 
> -- 
> Nick Kew

What I didn't catch is why the original php scripts
couldn't be edited.
if the output section of the scripts was edited to
have valid XHTML as output it would be much simpler.

an example of a simple function to dump validating
xhtml header data to apache:

function printHeader(){
	echo <<<EOF
<?xml version="1.0" ?>
<!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" lang="en">
<head>
<meta http-equiv="Content-Type"
content="application/xhtml+xml; charset=UTF-8"/>
<title>$title</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="Author" content=""/>
<meta http-equiv="Content-Style-Type"
content="text/css" />
<link rel="stylesheet" media="all" type="text/css"
href="css/fixed.css"/>
</head>
<body>

EOF;
}

the <?xml version="1.0" ?> actually makes it easier to
obtain correct functionality in IE with validating
pages, It throws IE into "Quirks" mode making it work
better with xml and css.

Jaqui

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message