[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [10750] api: prepare for HTML5
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [10750] api: prepare for HTML5 |
Date: |
Tue, 05 Feb 2013 22:13:30 +0000 |
Revision: 10750
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10750
Author: sigurdne
Date: 2013-02-05 22:13:29 +0000 (Tue, 05 Feb 2013)
Log Message:
-----------
api: prepare for HTML5
Modified Paths:
--------------
trunk/phpgwapi/inc/class.xslttemplates.inc.php
Modified: trunk/phpgwapi/inc/class.xslttemplates.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.xslttemplates.inc.php 2013-02-05 07:40:24 UTC
(rev 10749)
+++ trunk/phpgwapi/inc/class.xslttemplates.inc.php 2013-02-05 22:13:29 UTC
(rev 10750)
@@ -90,7 +90,7 @@
/**
* Set the output format
*
- * @internal currently supports html and wml
+ * @internal currently supports html, html5 and wml
* @param string $output the desired output format
*/
public function set_output($output)
@@ -100,6 +100,7 @@
{
case 'wml':
case 'html':
+ case 'html5':
$this->output = $output;
break;
default:
@@ -268,9 +269,13 @@
switch ( $this->output )
{
case 'wml':
- $this->xsldata .= '<xsl:output
method = "xml" encoding="utf-8" doctype-public="-//WAPFORUM//DTD WML 1.3//EN"
doctype-system="http://www.wapforum.org/DTD/wml13.dtd" />'."\n";
+ $this->xsldata .= '<xsl:output
method = "xml" encoding="utf-8" doctype-public="-//WAPFORUM//DTD WML 1.3//EN"
doctype-system="http://www.wapforum.org/DTD/wml13.dtd" indent="yes" />'."\n";
break;
+ case 'html5':
+ $this->xsldata .= '<xsl:output
method="xml" doctype-system="about:legacy-compat" encoding="UTF-8" indent="yes"
/>'."\n";
+ break;
+
case 'html':
default:
$this->xsldata .= '<xsl:output
method="html" version="4.01" encoding="utf-8" indent="yes"
omit-xml-declaration="yes" standalone="yes"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
doctype-public="-//W3C//DTD HTML 4.01//EN" media-type="text/html"/>' . "\n";
@@ -420,7 +425,19 @@
return '';
}
- return preg_replace('/<!DOCTYPE([^>])+>/', '', $html);
+
+ switch ( $this->output)
+ {
+ case 'wml':
+ case 'html5':
+ $html = preg_replace('/<\?xml
version([^>])+>/', '', $html);
+ break;
+ default:
+ }
+
+ $html = preg_replace('/<!DOCTYPE([^>])+>/', '', $html);
+
+ return $html;
}
function pparse()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [10750] api: prepare for HTML5,
Sigurd Nes <=