-/* private */ function ccPrologue() {
- global $wgOutputEncoding;
-
- echo "<" . "?xml version='1.0' encoding='{$wgOutputEncoding}' ?" . ">
-
-<rdf:RDF xmlns:cc=\"http://web.resource.org/cc/\"
- xmlns:dc=\"http://purl.org/dc/elements/1.1/\"
- xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">
-";
-}
-
-/* private */ function ccSubPrologue($type, $url) {
- $url = htmlspecialchars( $url );
- echo " <cc:{$type} rdf:about=\"{$url}\">\n";
-}
-
-/* private */ function ccSubEpilogue($type) {
- echo " </cc:{$type}>\n";
-}
-
-/* private */ function ccLicense($terms) {
-
- foreach ($terms as $term) {
- switch ($term) {
- case 're':
- ccTerm('permits', 'Reproduction'); break;
- case 'di':
- ccTerm('permits', 'Distribution'); break;
- case 'de':
- ccTerm('permits', 'DerivativeWorks'); break;
- case 'nc':
- ccTerm('prohibits', 'CommercialUse'); break;
- case 'no':
- ccTerm('requires', 'Notice'); break;
- case 'by':
- ccTerm('requires', 'Attribution'); break;
- case 'sa':
- ccTerm('requires', 'ShareAlike'); break;
- case 'sc':
- ccTerm('requires', 'SourceCode'); break;
+ protected function pageOrString( $name, $page, $str ){
+ if( $page instanceof Title )
+ $nt = $page;
+ else
+ $nt = Title::newFromText( $page );
+
+ if( !$nt || $nt->getArticleID() == 0 ){
+ $this->element( $name, $str );
+ } else {
+ $this->page( $name, $nt );