anewt-developers team mailing list archive
-
anewt-developers team
-
Mailing list archive
-
Message #00069
[Branch ~uws/anewt/anewt.uws] Rev 1690: [xhtml] Output valid XHTML in test code
------------------------------------------------------------
revno: 1690
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt.uws
timestamp: Sun 2009-07-19 22:16:18 +0200
message:
[xhtml] Output valid XHTML in test code
Use AnewtPage and add all content to the page, so that DTD
validation can be used on the generated XHTML output. (Yes,
this is a circular dependency, but this is test code, so it
doesn't matter.)
modified:
xhtml/xhtml.test.php
=== modified file 'xhtml/xhtml.test.php'
--- xhtml/xhtml.test.php 2008-10-24 21:23:51 +0000
+++ xhtml/xhtml.test.php 2009-07-19 20:16:18 +0000
@@ -123,12 +123,12 @@
new AnewtXHTMLTableRow(ax_fragment(
new AnewtXHTMLTableCell('r1c1'),
new AnewtXHTMLTableCell('r1c2')
- ),
+ )),
new AnewtXHTMLTableRow(ax_fragment(
new AnewtXHTMLTableCell('r2c1'),
new AnewtXHTMLTableCell('r2c2')
- )
-))));
+ ))
+));
$table->append_child($table_body);
$fragment->append_child($table);
@@ -138,7 +138,7 @@
$fragment->append_child(new AnewtXHTMLHeader2('Forms'));
-$form = new AnewtXHTMLForm(null, array('method' => 'GET'));
+$form = new AnewtXHTMLForm(null, array('method' => 'get', 'action' => '#'));
$input_fragment = new AnewtXHTMLFragment();
$input_fragment->append_child(new AnewtXHTMLLabel('Label: ', array('for' => 'test')));
@@ -187,6 +187,10 @@
/* Final output */
-echo to_string($fragment), NL;
+anewt_include('page');
+$page = new AnewtPage();
+$page->title = 'Anewt XHTML output test';
+$page->append($fragment);
+$page->flush();
?>
--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws
Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription.