Re: about realease 2.0 beta 3 of HTML_Page package
| From: | Klaus Guenther | Date: | Mon, 14 Jul 2003 11:58:34 +0000 |
| Subject: | Re: about realease 2.0 beta 3 of HTML_Page package | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-18231@lists.php.net to get a copy of this message | ||
Hi Laurent,
> You can see all my tests sources (beta 2 and then beta 3) available at :
> http://farell.free.fr/en/pear/docs/page/show.php
>
> The problem seems to come from <![CDATA[ generation; i'll let you see.
> It's first time i see the CDATA in a inline stylesheet declaration .
The reason I used CDATA for that was this link:
http://www.w3.org/TR/xhtml1/#h-4.8
Apparently, that is not supported for the text/html mime type. Of course,
any XML parser recognizes it, so when all major browsers support
application/xhtml+xml, it should work. You can find browser test results
here:
http://www.w3.org/People/mimasa/test/xhtml/media-types/results
I ran the example on Mozilla, and the <![CDATA[ ... ]]> and text/html
combination does not work. However, the <!-- ... --> and
application/xhtml+xml doesn't work, either. Of course, when you use styles
to format an XHTML page, it is not sufficient to format the body element:
you must format the html element, too. Check out the attached corrected
example that works on Mozilla.
This article sheds light on problems with MIME types. Unfortunately, IE does
not support application/xhtml+xml yet.
http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html
I've changed it in CVS to use <!-- ... --> for text/html and <![CDATA[
... ]]> otherwise. Hopefully that solves everyone's problems :-)
> BTW, it was also the first time i saw "is_set" php function; is it an
> alias of "isset". ( See setNamespace function : line 895)
Oops... I just threw that together quickly and I guess I did that because
there is is_bool, is_string, etc. And indeed it seems that it is an alias,
although not mentioned in the docs. Fixed in CVS.
As to your question about the ContentType meta tag... Yes, that was indeed
an error. It is fixed in CVS.
Check the latest CVS version and let me know if it works for you. Also,
please let me know if you find any other bugs.
Thanks!
Klaus
<?php require_once ('HTML/CSS.php'); require_once ('HTML/Page.php'); function display() { $css = new HTML_CSS(); $css->setStyle('html', 'background-color', '#3A6EA5'); $css->setStyle('body', 'background-color', '#3A6EA5'); $p = new HTML_Page(); $p->setLineEnd( (OS_WINDOWS) ? 'win' : 'unix' ); $p->setCharset( 'ISO-8859-1' ); $p->setDoctype( 'XHTML 1.0 Transitional' ); $p->setMimeEncoding( 'application/xhtml+xml' ); $p->setLang( "fr" ); $p->setCache( false ); $p->setMetaContentType(); $p->setTitle( "Installation" ); $p->addStyleDeclaration(&$css); $p->addBodyContent('<h1>SetupWizard</h1>'); $p->display(); } display(); ?>
<?php require_once ('HTML/CSS.php'); require_once ('HTML/Page.php'); function display() { $css = new HTML_CSS(); $css->setStyle('html', 'background-color', '#3A6EA5'); $css->setStyle('body', 'background-color', '#3A6EA5'); $p = new HTML_Page(); $p->setLineEnd( (OS_WINDOWS) ? 'win' : 'unix' ); $p->setCharset( 'ISO-8859-1' ); $p->setDoctype( 'XHTML 1.0 Transitional' ); $p->setMimeEncoding( 'application/xhtml+xml' ); $p->setLang( "fr" ); $p->setCache( false ); $p->setMetaContentType(); $p->setTitle( "Installation" ); $p->addStyleDeclaration(&$css); $p->addBodyContent('<h1>SetupWizard</h1>'); $p->display(); } display(); ?>