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

Commit 2b43ea6

Browse files
committed
Merge pull request zendframework/zendframework#1921 from froschdesign/ZF2-401
[ZF2-401] Add support for RDFa 1.1 doctype
9 parents 377b920 + e3b1be1 + 19f0ef6 + 33bf9c0 + 3729984 + a5ce396 + 698dbe0 + 0efca0b + e5a8489 commit 2b43ea6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Helper/Doctype.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class Doctype extends AbstractHelper
2929
const XHTML1_TRANSITIONAL = 'XHTML1_TRANSITIONAL';
3030
const XHTML1_FRAMESET = 'XHTML1_FRAMESET';
3131
const XHTML1_RDFA = 'XHTML1_RDFA';
32+
const XHTML1_RDFA11 = 'XHTML1_RDFA11';
3233
const XHTML_BASIC1 = 'XHTML_BASIC1';
3334
const XHTML5 = 'XHTML5';
3435
const HTML4_STRICT = 'HTML4_STRICT';
@@ -70,6 +71,7 @@ protected static function registerDefaultDoctypes()
7071
self::XHTML1_TRANSITIONAL => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
7172
self::XHTML1_FRAMESET => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
7273
self::XHTML1_RDFA => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
74+
self::XHTML1_RDFA11 => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">',
7375
self::XHTML_BASIC1 => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">',
7476
self::XHTML5 => '<!DOCTYPE html>',
7577
self::HTML4_STRICT => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
@@ -124,6 +126,7 @@ public function __invoke($doctype = null)
124126
case self::XHTML1_FRAMESET:
125127
case self::XHTML_BASIC1:
126128
case self::XHTML1_RDFA:
129+
case self::XHTML1_RDFA11:
127130
case self::XHTML5:
128131
case self::HTML4_STRICT:
129132
case self::HTML4_LOOSE:

test/Helper/DoctypeTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function testIsXhtmlReturnsTrueForXhtmlDoctypes()
7575
Helper\Doctype::XHTML1_TRANSITIONAL,
7676
Helper\Doctype::XHTML1_FRAMESET,
7777
Helper\Doctype::XHTML1_RDFA,
78+
Helper\Doctype::XHTML1_RDFA11,
7879
Helper\Doctype::XHTML5
7980
);
8081

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

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

143145
// build-in doctypes
144146
$doctypes = array(

0 commit comments

Comments
 (0)