+2010-11-17 Jochen Rau <jochen.rau@typoplanet.de>
+
+ * Added feature #16395: Add basic support for RDFa in core (semantic web)
+
2010-11-17 Steffen Gebert <steffen@steffen-gebert.de>
* Fixed bug #14449: Deprecate usage of ImageMagick version 4 and 5
--------------------
-SVN ID: $Id$
+SVN ID: $Id$
\ No newline at end of file
$GLOBALS['TSFE']->xhtmlVersion = 105;
break;
case 'xhtml_11':
+ case 'xhtml+rdfa_10':
$GLOBALS['TSFE']->xhtmlVersion = 110;
break;
case 'xhtml_2':
$docTypeParts[] = $GLOBALS['TSFE']->config['config']['xmlprologue'];
}
// Part 2: DTD
- if ($GLOBALS['TSFE']->config['config']['doctype']) {
- switch ((string) $GLOBALS['TSFE']->config['config']['doctype']) {
+ $doctype = $GLOBALS['TSFE']->config['config']['doctype'];
+ if ($doctype) {
+ switch ($doctype) {
case 'xhtml_trans' :
$docTypeParts[] = '<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
PUBLIC "-//W3C//DTD XHTML 2.0//EN"
"http://www.w3.org/TR/xhtml2/DTD/xhtml2.dtd">';
break;
+ case 'xhtml+rdfa_10' :
+ $docTypeParts[] = '<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
+ "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">';
+ break;
case 'html_5' :
$docTypeParts[] = '<!DOCTYPE html>';
break;
case 'none' :
break;
default :
- $docTypeParts[] = $GLOBALS['TSFE']->config['config']['doctype'];
+ $docTypeParts[] = $doctype;
}
} else {
$docTypeParts[] = '<!DOCTYPE html
}
if ($GLOBALS['TSFE']->xhtmlVersion) {
-
- // Setting <html> tag attributes:
- $htmlTagAttributes['xmlns'] = 'http://www.w3.org/1999/xhtml';
$htmlTagAttributes['xml:lang'] = $htmlLang;
- if ($GLOBALS['TSFE']->xhtmlVersion < 110) {
- $htmlTagAttributes['lang'] = $htmlLang;
+ }
+ if ($GLOBALS['TSFE']->xhtmlVersion < 110 || $doctype === 'html_5') {
+ $htmlTagAttributes['lang'] = $htmlLang;
+ }
+ if ($GLOBALS['TSFE']->xhtmlVersion || $doctype === 'html_5') {
+ $htmlTagAttributes['xmlns'] = 'http://www.w3.org/1999/xhtml'; // We add this to HTML5 to achieve a slightly better backwards compatibility
+ foreach ($GLOBALS['TSFE']->config['config']['namespaces.'] as $prefix => $uri) {
+ $htmlTagAttributes['xmlns:' . htmlspecialchars($prefix)] = $uri; // $uri gets htmlspecialchared later
}
}
var $fromTC = 0; // Means that everything is returned instead of only uid and label-field
}
-?>
+?>
\ No newline at end of file