Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#1921 from froschdesign…
Browse files Browse the repository at this point in the history
…/ZF2-401

[ZF2-401] Add support for RDFa 1.1 doctype
  • Loading branch information
EvanDotPro committed Jul 20, 2012
9 parents 377b920 + e3b1be1 + 19f0ef6 + 33bf9c0 + 3729984 + a5ce396 + 698dbe0 + 0efca0b + e5a8489 commit 2b43ea6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Helper/Doctype.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Doctype extends AbstractHelper
const XHTML1_TRANSITIONAL = 'XHTML1_TRANSITIONAL';
const XHTML1_FRAMESET = 'XHTML1_FRAMESET';
const XHTML1_RDFA = 'XHTML1_RDFA';
const XHTML1_RDFA11 = 'XHTML1_RDFA11';
const XHTML_BASIC1 = 'XHTML_BASIC1';
const XHTML5 = 'XHTML5';
const HTML4_STRICT = 'HTML4_STRICT';
Expand Down Expand Up @@ -70,6 +71,7 @@ protected static function registerDefaultDoctypes()
self::XHTML1_TRANSITIONAL => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
self::XHTML1_FRAMESET => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
self::XHTML1_RDFA => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
self::XHTML1_RDFA11 => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">',
self::XHTML_BASIC1 => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">',
self::XHTML5 => '<!DOCTYPE html>',
self::HTML4_STRICT => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
Expand Down Expand Up @@ -124,6 +126,7 @@ public function __invoke($doctype = null)
case self::XHTML1_FRAMESET:
case self::XHTML_BASIC1:
case self::XHTML1_RDFA:
case self::XHTML1_RDFA11:
case self::XHTML5:
case self::HTML4_STRICT:
case self::HTML4_LOOSE:
Expand Down
2 changes: 2 additions & 0 deletions test/Helper/DoctypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function testIsXhtmlReturnsTrueForXhtmlDoctypes()
Helper\Doctype::XHTML1_TRANSITIONAL,
Helper\Doctype::XHTML1_FRAMESET,
Helper\Doctype::XHTML1_RDFA,
Helper\Doctype::XHTML1_RDFA11,
Helper\Doctype::XHTML5
);

Expand Down Expand Up @@ -139,6 +140,7 @@ public function testIsRdfa()
$this->assertFalse($this->helper->isRdfa());

$this->assertTrue($this->helper->__invoke(Helper\Doctype::XHTML1_RDFA)->isRdfa());
$this->assertTrue($this->helper->__invoke(Helper\Doctype::XHTML1_RDFA11)->isRdfa());

// build-in doctypes
$doctypes = array(
Expand Down

0 comments on commit 2b43ea6

Please sign in to comment.