anewt-developers team mailing list archive
-
anewt-developers team
-
Mailing list archive
-
Message #00316
[Branch ~uws/anewt/anewt.uws] Rev 1821: [page] Use XHTML nodes for top level structure
------------------------------------------------------------
revno: 1821
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt
timestamp: Thu 2011-03-17 16:18:17 +0100
message:
[page] Use XHTML nodes for top level structure
...instead of standard AnewtXMLDomElement instances.
modified:
page/page.lib.php
--
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
=== modified file 'page/page.lib.php'
--- page/page.lib.php 2011-03-17 14:52:38 +0000
+++ page/page.lib.php 2011-03-17 15:18:17 +0000
@@ -377,10 +377,8 @@
{
/* Create basic element nodes */
- $head = new AnewtXMLDomElement('head');
- $body = new AnewtXMLDomElement('body');
- $head->always_render_closing_tag = true;
- $body->always_render_closing_tag = true;
+ $head = new AnewtXHTMLHead();
+ $body = new AnewtXHTMLBody();
/* Content-type in meta tag. This must be the first element inside the
* <head>...</head> element. */
@@ -551,14 +549,15 @@
$document->set_content_type($this->_get('content-type'));
$document->set_encoding($this->_get('encoding'));
- $html = new AnewtXMLDomElement('html', array(
- 'xmlns' => 'http://www.w3.org/1999/xhtml',
- 'xml:lang' => $this->_get('language'),
- 'lang' => $this->_get('language'),
- ));
+ $html = new AnewtXHTMLHtml(
+ array($head, $body),
+ array(
+ 'xmlns' => 'http://www.w3.org/1999/xhtml',
+ 'xml:lang' => $this->_get('language'),
+ 'lang' => $this->_get('language'),
+ )
+ );
- $html->append_child($head);
- $html->append_child($body);
$document->append_child($html);
return $document;