Index: trunk/phase3/docs/export-0.6.xsd |
— | — | @@ -15,8 +15,8 @@ |
16 | 16 | |
17 | 17 | Version 0.5 adds byte count per revision. |
18 | 18 | |
19 | | - Version 0.6 adds a separate namespace tag, locates the |
20 | | - redirect target and strips of the namespace from the title. |
| 19 | + Version 0.6 adds a separate namespace tag, and resolves the |
| 20 | + redirect target and adds a separate sha1 tag for each revision. |
21 | 21 | |
22 | 22 | The canonical URL to the schema document is: |
23 | 23 | http://www.mediawiki.org/xml/export-0.6.xsd |
— | — | @@ -106,8 +106,8 @@ |
107 | 107 | <!-- Title in text form. (Using spaces, not underscores; with namespace ) --> |
108 | 108 | <element name="title" type="string"/> |
109 | 109 | |
110 | | - <!-- Namesapce in text form --> |
111 | | - <element name="ns" type="string"/> |
| 110 | + <!-- Namespace in canonical form --> |
| 111 | + <element name="ns" type="positiveInteger"/> |
112 | 112 | |
113 | 113 | <!-- optional page ID number --> |
114 | 114 | <element name="id" type="positiveInteger" minOccurs="0"/> |
— | — | @@ -137,6 +137,7 @@ |
138 | 138 | <element name="contributor" type="mw:ContributorType"/> |
139 | 139 | <element name="minor" minOccurs="0" /> |
140 | 140 | <element name="comment" type="mw:CommentType" minOccurs="0"/> |
| 141 | + <element name="sha1" type="string" /> |
141 | 142 | <element name="text" type="mw:TextType" /> |
142 | 143 | </sequence> |
143 | 144 | </complexType> |
Index: trunk/phase3/includes/Export.php |
— | — | @@ -486,6 +486,13 @@ |
487 | 487 | $out .= ' ' . Xml::element( 'redirect', array( 'title' => self::canonicalTitle( $redirect ) ) ) . "\n"; |
488 | 488 | } |
489 | 489 | } |
| 490 | + |
| 491 | + if ( $row->rev_sha1 ) { |
| 492 | + $out .= " " . Xml::element('sha1', null, strval($row->rev_sha1) ) . "\n"; |
| 493 | + } else { |
| 494 | + $out .= " <sha1/>\n"; |
| 495 | + } |
| 496 | + |
490 | 497 | if ( $row->page_restrictions != '' ) { |
491 | 498 | $out .= ' ' . Xml::element( 'restrictions', array(), |
492 | 499 | strval( $row->page_restrictions ) ) . "\n"; |