| Index: trunk/phase3/skins/MonoBook.php |
| — | — | @@ -51,7 +51,10 @@ |
| 52 | 52 | wfSuppressWarnings(); |
| 53 | 53 | |
| 54 | 54 | ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 55 | | -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>"> |
| | 55 | +<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php |
| | 56 | + foreach($this->data['xhtmlnamespaces'] as $tag => $ns) { |
| | 57 | + ?>xmlns:<?php echo "{$tag}=\"{$ns}\" "; |
| | 58 | + } ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>"> |
| 56 | 59 | <head> |
| 57 | 60 | <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" /> |
| 58 | 61 | <?php $this->html('headlinks') ?> |
| Index: trunk/phase3/includes/OutputPage.php |
| — | — | @@ -1043,6 +1043,7 @@ |
| 1044 | 1044 | */ |
| 1045 | 1045 | public function headElement() { |
| 1046 | 1046 | global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType; |
| | 1047 | + global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces; |
| 1047 | 1048 | global $wgUser, $wgContLang, $wgUseTrackbacks, $wgTitle, $wgStyleVersion; |
| 1048 | 1049 | |
| 1049 | 1050 | if( $wgMimeType == 'text/xml' || $wgMimeType == 'application/xhtml+xml' || $wgMimeType == 'application/xml' ) { |
| — | — | @@ -1058,7 +1059,11 @@ |
| 1059 | 1060 | } |
| 1060 | 1061 | |
| 1061 | 1062 | $rtl = $wgContLang->isRTL() ? " dir='RTL'" : ''; |
| 1062 | | - $ret .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" $rtl>\n"; |
| | 1063 | + $ret .= "<html xmlns=\"{$wgXhtmlDefaultNamespace}\" "; |
| | 1064 | + foreach($wgXhtmlNamespaces as $tag => $ns) { |
| | 1065 | + $ret .= "xmlns:{$tag}=\"{$ns}\" "; |
| | 1066 | + } |
| | 1067 | + $ret .= "xml:lang=\"$wgContLanguageCode\" lang=\"$wgContLanguageCode\" $rtl>\n"; |
| 1063 | 1068 | $ret .= "<head>\n<title>" . htmlspecialchars( $this->getHTMLTitle() ) . "</title>\n"; |
| 1064 | 1069 | array_push( $this->mMetatags, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) ); |
| 1065 | 1070 | |
| Index: trunk/phase3/includes/SkinTemplate.php |
| — | — | @@ -135,6 +135,7 @@ |
| 136 | 136 | global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgContLang, $wgOut; |
| 137 | 137 | global $wgScript, $wgStylePath, $wgContLanguageCode; |
| 138 | 138 | global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgRequest; |
| | 139 | + global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces; |
| 139 | 140 | global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses, $wgHideInterlanguageLinks; |
| 140 | 141 | global $wgMaxCredits, $wgShowCreditsIfMax; |
| 141 | 142 | global $wgPageShowWatchingUsers; |
| — | — | @@ -246,6 +247,8 @@ |
| 247 | 248 | $tpl->set( 'trackbackhtml', null ); |
| 248 | 249 | } |
| 249 | 250 | |
| | 251 | + $tpl->setRef( 'xhtmldefaultnamespace', $wgXhtmlDefaultNamespace ); |
| | 252 | + $tpl->set( 'xhtmlnamespaces', $wgXhtmlNamespaces ); |
| 250 | 253 | $tpl->setRef( 'mimetype', $wgMimeType ); |
| 251 | 254 | $tpl->setRef( 'jsmimetype', $wgJsMimeType ); |
| 252 | 255 | $tpl->setRef( 'charset', $wgOutputEncoding ); |
| Index: trunk/phase3/includes/DefaultSettings.php |
| — | — | @@ -687,7 +687,16 @@ |
| 688 | 688 | $wgJsMimeType = 'text/javascript'; |
| 689 | 689 | $wgDocType = '-//W3C//DTD XHTML 1.0 Transitional//EN'; |
| 690 | 690 | $wgDTD = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'; |
| | 691 | +$wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'; |
| 691 | 692 | |
| | 693 | +# Permit other namespaces in addition to the w3.org default. |
| | 694 | +# Use the prefix for the key and the namespace for the value. For |
| | 695 | +# example: |
| | 696 | +# $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg'; |
| | 697 | +# Normally we wouldn't have to define this in the root <html> |
| | 698 | +# element, but IE needs it there in some circumstances. |
| | 699 | +$wgXhtmlNamespaces = array(); |
| | 700 | + |
| 692 | 701 | /** Enable to allow rewriting dates in page text. |
| 693 | 702 | * DOES NOT FORMAT CORRECTLY FOR MOST LANGUAGES */ |
| 694 | 703 | $wgUseDynamicDates = false; |
| Index: trunk/phase3/RELEASE-NOTES |
| — | — | @@ -478,6 +478,7 @@ |
| 479 | 479 | * (bug 3706) Allow users to be exempted from IP blocks. The ipblock-exempt permission |
| 480 | 480 | key has been added to enable this behaviour, by default assigned to sysops. |
| 481 | 481 | * (bug 7948) importDump.php now warn that Recentchanges need to be rebuild. |
| | 482 | +* (bug 7667) allow XHTML namespaces customization |
| 482 | 483 | |
| 483 | 484 | |
| 484 | 485 | == Languages updated == |