jenkins-bot has submitted this change and it was merged.

Change subject: Refactor information template parsing to better support 
multiple templates
......................................................................


Refactor information template parsing to better support multiple templates

* handle classnames as well as ids
* prioritize templates based on their type (e.g. {{Photograph}} is more
  relevant than {{Artwork}})
* return the number of templates with author (Artist) fields as AuthorCount
* ignore {{Book}} templates
* fix an unrelated test that was incorrectly named and did not run

Bug: T75332
Bug: T74084
Bug: T74081
Change-Id: I011c195fb4b32560e70cb36d2a9a780ef3f6a4ba
---
M DataCollector.php
M DomNavigator.php
M TemplateParser.php
M tests/html/File_Askaris_im_Warschauer_Getto_-_1943.jpg.html
A tests/html/File_Bust_of_Wilhelmine_of_Bayreuth.jpg.html
A tests/html/File_Fourth_Doctor.jpg.html
M tests/phpunit/DataCollectorTest.php
M tests/phpunit/DomNavigatorTest.php
M tests/phpunit/ParserTestHelper.php
M tests/phpunit/TemplateParserTest.php
10 files changed, 607 insertions(+), 71 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/DataCollector.php b/DataCollector.php
index 1e8042f..a443203 100644
--- a/DataCollector.php
+++ b/DataCollector.php
@@ -332,13 +332,26 @@
 
        /**
         * Receives the list of information templates found by the template 
parser and selects which one to use.
+        * Also collects all the authors to make sure attribution requirements 
are honored.
         * @param array $informationTemplates an array of information templates 
, each is an array of metdata fields in fieldname => value form
         * @return array an array of metdata fields in fieldname => value form
         */
        protected function selectInformationTemplate( $informationTemplates ) {
-               // FIXME we should figure out which is the real {{Information}} 
template (as opposed to
-               //       {{Artwork}} or {{Book}}) and return that. Usually it 
is the first one though.
-               return $informationTemplates ? $informationTemplates[0] : 
array();
+               if ( !$informationTemplates ) {
+                       return array();
+               }
+
+               $authorCount = 0;
+               foreach ( $informationTemplates as $template ) {
+                       if ( isset( $template['Artist'] ) ) {
+                               $authorCount++;
+                       }
+               }
+
+               if ( $authorCount > 1 ) {
+                       $informationTemplates[0]['AuthorCount'] = $authorCount;
+               }
+               return $informationTemplates[0];
        }
 
        /**
diff --git a/DomNavigator.php b/DomNavigator.php
index a04b3f9..c3efee1 100644
--- a/DomNavigator.php
+++ b/DomNavigator.php
@@ -49,6 +49,19 @@
        }
 
        /**
+        * Returns a list of elements of the given type which have a class 
starting with the given string.
+        * @param string|array $element HTML tag name (* to accept all) or 
array of tag names
+        * @param string $classPrefix
+        * @param DOMNode $context if present, the method will only search 
inside this element
+        * @return DOMNodeList|DOMElement[]
+        */
+       public function findElementsWithClassPrefix( $element, $classPrefix, 
DOMNode $context = null ) {
+               $element = $this->handleElementOrList( $element );
+               $xpath = "./descendant-or-self::{$element}[contains(concat(' ', 
normalize-space(@class)), ' $classPrefix')]";
+               return $this->findByXpath( $xpath, $context );
+       }
+
+       /**
         * Returns a list of elements of the given type which have the given 
class and any lang attribute.
         * (In other words, this is equivalent to the CSS selector 
'element.class[lang]'.)
         * @param string|array $element HTML tag name (* to accept all) or 
array of tag names
@@ -107,6 +120,26 @@
        }
 
        /**
+        * Returns the first class matching a prefix.
+        * @param DOMNode $node
+        * @param string $classPrefix
+        * @return string|null
+        */
+       public function getFirstClassWithPrefix( DOMNode $node, $classPrefix ) {
+               if ( ! $node instanceof \DOMElement ) {
+                       return null;
+               }
+               $classes = explode( ' ', $node->getAttribute( 'class' ) );
+               foreach ( $classes as $class ) {
+                       $length = strlen( $classPrefix );
+                       if ( substr( $class, 0, $length ) === $classPrefix ) {
+                               return $class;
+                       }
+               }
+               return null;
+       }
+
+       /**
         * Returns the closest ancestor of the given node, which is of the 
given type (like jQuery.closest())
         * @param DOMNode $node
         * @param string $element HTML tag name
diff --git a/TemplateParser.php b/TemplateParser.php
index 583a793..9b56c9e 100644
--- a/TemplateParser.php
+++ b/TemplateParser.php
@@ -31,7 +31,7 @@
        );
 
        /**
-        * HTML element id => metadata field name mapping for information 
template data.
+        * HTML element class/id => metadata field name mapping for information 
template data.
         * @var array
         */
        protected static $informationFieldClasses = array(
@@ -54,6 +54,31 @@
                'fileinfotpl_art_title' => 'ObjectName',
                'fileinfotpl_perm' => 'Permission',
                'fileinfotpl_credit' => 'Attribution',
+       );
+
+       /**
+        * Classnames identifying {{Information}}-like templates, ordered from 
highest to lowest
+        * priority. Higher priority means that template is more likely to be 
about the image
+        * (as opposed to e.g. some object visible on the image), data in 
higher-priority templates
+        * will be preferred. The classes should be on the <table> element (for 
templates using the
+        * deprecated id-based fieldname markup) or on the same element which 
has the "fileinfotpl"
+        * class (for templates with the class-based markup).
+        * @var array
+        */
+       protected static $infoTemplateClasses = array(
+               'fileinfotpl-type-photograph',
+               'fileinfotpl-type-information',
+               'fileinfotpl-type-artwork',
+       );
+
+       /**
+        * Blacklist for templates which should not have handled like 
{{Information}} even if they have
+        * fields matching $informationFieldClasses. Elements of this array 
refere to the same kind of
+        * classnames as $infoTemplateClasses.
+        * @var array
+        */
+       protected static $infoTemplateBlacklist = array(
+               'fileinfotpl-type-book',
        );
 
        /**
@@ -137,32 +162,97 @@
         * @return array an array if information(-like) templates: array( 0 => 
array( 'ImageDescription' => ... ) ... )
         */
        protected function parseInformationFields( DomNavigator $domNavigator ) 
{
+               $attributePrefix = 'fileinfotpl_';
                $data = array();
-               foreach ( $domNavigator->findElementsWithIdPrefix( array( 'td', 
'th' ), 'fileinfotpl_' ) as $labelField ) {
-                       $id = $labelField->getAttribute( 'id' );
-                       if ( !isset( self::$informationFieldClasses[$id] ) ) {
-                               continue;
-                       }
-                       $fieldName = self::$informationFieldClasses[$id];
-
+               foreach ( $domNavigator->findElementsWithIdPrefix( array( 'td', 
'th' ), $attributePrefix ) as $labelField ) {
                        $informationField = $domNavigator->nextElementSibling( 
$labelField );
                        if ( !$informationField ) {
                                continue;
                        }
+                       $id = $labelField->getAttribute( 'id' );
+                       $group = $domNavigator->closest( $informationField, 
'table' );
+                       $this->parseInformationField( $domNavigator, 
$informationField, $group, $id, $data );
+               }
+               foreach ( $domNavigator->findElementsWithClass( '*', 
'fileinfotpl' ) as $group ) {
+                       foreach ( $domNavigator->findElementsWithClassPrefix( 
'*', $attributePrefix, $group ) as $informationField ) {
+                               $class = 
$domNavigator->getFirstClassWithPrefix( $informationField, $attributePrefix );
+                               $this->parseInformationField( $domNavigator, 
$informationField, $group, $class, $data );
+                       }
+               }
 
-                       // group fields coming from the same template
-                       $table = $domNavigator->closest( $labelField, 'table' );
-                       $groupName = $table ? $table->getNodePath() : '-';
+               $this->sortInformationGroups( $data );
+               return array_values( $data ); // using node paths to identify 
tables is an internal detail, hide it
+       }
 
-                       $method = 'parseField' . $fieldName;
+       /**
+        * Helper function for the inner loop of parseInformationFields
+        * @param DomNavigator $domNavigator
+        * @param DOMElement $informationField the node holding the data
+        * @param DOMElement|null $group the top node containing all fields of 
this type; expected (but not
+        *  required) to have one of the $informationFieldClasses.
+        * @param string $idOrClass id or class identifying the field, per 
$informationFieldClasses
+        *  Node is ignored if this is not a key of $informationFieldClasses. 
Also ignored if this is null.
+        * @param array $data
+        */
+       protected function parseInformationField( DomNavigator $domNavigator, 
DOMElement $informationField, $group, $idOrClass, array &$data ) {
+               if ( !isset( self::$informationFieldClasses[$idOrClass] ) ) {
+                       return;
+               }
+               $fieldName = self::$informationFieldClasses[$idOrClass];
 
-                       if ( !method_exists( $this, $method ) ) {
-                               $method = 'parseContents';
+               // group fields coming from the same template
+               $groupName = $groupType = '-';
+               if ( $group ) {
+                       $groupName = $group->getNodePath();
+                       $groupType = $domNavigator->getFirstClassWithPrefix( 
$group, 'fileinfotpl-type-' ) ?: '-';
+               }
+
+               if ( in_array( $groupType, self::$infoTemplateBlacklist ) ) {
+                       return;
+               }
+
+               if ( isset ( $data[$groupName][$fieldName] ) ) {
+                       // don't parse the same field multiple times if it has 
both id and classes; also
+                       // ignore a second field of the same type in the same 
template
+                       return;
+               }
+
+               $method = 'parseField' . $fieldName;
+               if ( !method_exists( $this, $method ) ) {
+                       $method = 'parseContents';
+               }
+
+               $data[$groupName][$fieldName] = $this->{$method}( 
$domNavigator, $informationField );
+               $data[$groupName]['_type'] = $groupType;
+       }
+
+       /**
+        * Sorts info template data groups according to 
$informationFieldClasses, highest priority first.
+        * Also removes the _type helper keys.
+        * @param array $data info template data, as returned by 
parseInformationFields()
+        */
+       protected function sortInformationGroups( array &$data ) {
+               $infoTemplateClasses = self::$infoTemplateClasses; // PHP 5.3 
does not like class references in closures
+
+               uasort( $data, function ( $template1, $template2 ) use ( 
$infoTemplateClasses ) {
+                       $priority1 = array_search( $template1['_type'], 
$infoTemplateClasses );
+                       $priority2 = array_search( $template2['_type'], 
$infoTemplateClasses );
+
+                       // preserve the order of unknown templates; known 
precedes unknown
+                       if ( $priority2 === false ) {
+                               return -1;
+                       } else if ( $priority1 === false) {
+                               return 1;
                        }
 
-                       $data[$groupName][$fieldName] = $this->{$method}( 
$domNavigator, $informationField );
+                       // $pri1 is smaller -> $template1['_type'] comes first 
in
+                       // $informationFieldClasses -> should return negative 
so $template1 comes first
+                       return $priority1 - $priority2;
+               } );
+
+               foreach ( $data as &$group ) {
+                       unset( $group['_type'] );
                }
-               return array_values( $data ); // using node paths to identify 
tables is an internal detail, hide it
        }
 
        /**
diff --git a/tests/html/File_Askaris_im_Warschauer_Getto_-_1943.jpg.html 
b/tests/html/File_Askaris_im_Warschauer_Getto_-_1943.jpg.html
index 206f1f9..793c66f 100644
--- a/tests/html/File_Askaris_im_Warschauer_Getto_-_1943.jpg.html
+++ b/tests/html/File_Askaris_im_Warschauer_Getto_-_1943.jpg.html
@@ -1,6 +1,5 @@
 <h2><span class="mw-headline" id="Summary">Summary</span><span 
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a 
href="//commons.wikimedia.org/w/index.php?title=File:Askaris_im_Warschauer_Getto_-_1943.jpg&amp;action=edit&amp;section=1"
 title="Edit section: Summary">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
-<div class="hproduct">
-<table class="toccolours vevent" style="width: 100%; direction: ltr;" 
cellpadding="2">
+<table class="fileinfotpl fileinfotpl-type-photograph toccolours hproduct 
vevent" style="width: 100%; direction: ltr;" cellpadding="2">
 <tr valign="top">
 <td id="fileinfotpl_art_title" class="fileinfo-paramfield">Title</td>
 <td><span class="fn"><span style="font-size:0.9em">German: <i>Askaris, die mit 
eingesetzt waren</i></span><span style="font-weight:bold"><br />
@@ -10,12 +9,12 @@
 <td id="fileinfotpl_desc" class="fileinfo-paramfield">Description</td>
 <td>
 <div class="description mw-content-ltr de" dir="ltr" lang="de" style=""><span 
class="description"><span class="language de" 
title="Deutsch"><b>Deutsch:</b></span> Zwei <a 
href="//de.wikipedia.org/wiki/Askaris" class="extiw" 
title="de:Askaris">Askaris</a> oder <a 
href="//de.wikipedia.org/wiki/Zwangsarbeitslager_Trawniki" class="extiw" 
title="de:Zwangsarbeitslager Trawniki">Trawnikis</a> als Vertreter sog. „<a 
href="//de.wikipedia.org/wiki/Fremdv%C3%B6lkische" class="extiw" 
title="de:Fremdvölkische">fremdvölkischer</a> Hilfseinheiten“ der <a 
href="//de.wikipedia.org/wiki/Schutzstaffel" class="extiw" 
title="de:Schutzstaffel">SS</a> stehen vor den Leichen getöteter Juden in einem 
Hauseingang im Warschauer Ghetto.</span></div>
-<div class="description mw-content-ltr en" dir="ltr" lang="en" style=""><span 
class="language en" title=""><b>English:</b></span> The unit trained in village 
of Trawniki was made up of Ukrainians, Russians, Belorussians, Poles, 
Estonians, Lithuanians, Latvians, ethnic Germans, Kazakhs and Tartars.</div>
+<div class="description mw-content-ltr en" dir="ltr" lang="en" style=""><span 
class="language en" title=""><b>English:</b></span> Two "askaris" or 
"herbalists" as representatives of the so-called "foreign subsidiary ethnic 
divisions" SS before the corpses of Jews in the doorway of the Warsaw Ghetto. 
The unit trained in village of Trawniki was made up of Ukrainians, Russians, 
Belorussians, Poles, Estonians, Lithuanians, Latvians, ethnic Germans, Kazakhs 
and Tartars.</div>
 </td>
 </tr>
 <tr valign="top">
 <td id="fileinfotpl_date" class="fileinfo-paramfield">Date</td>
-<td>between <time class="dtstart" datetime="1943-04-19">19 April 1943</time> 
and <time class="dtstart" datetime="1943-05-16">16 May 1943</time></td>
+<td>between <span style="white-space:nowrap"><time class="dtstart" 
datetime="1943-04-19">19 April 1943</time></span> and <span 
style="white-space:nowrap"><time class="dtstart" datetime="1943-05-16">16 May 
1943</time></span></td>
 </tr>
 <tr valign="top">
 <td id="fileinfotpl_aut" class="fileinfo-paramfield type">Photographer</td>
@@ -26,7 +25,7 @@
 <td>
 <ul>
 <li><span class="identifier">NARA copy Nr.42<sup id="cite_ref-NARA_3-0" 
class="reference"><a href="#cite_note-NARA-3">[3]</a></sup></span></li>
-<li><span class="identifier"><a rel="nofollow" class="external text" 
href="http://www.ushmm.org";>United States Holocaust Memorial Museum</a>, 
Photograph #<a rel="nofollow" class="external text" 
href="http://resources.ushmm.org/inquery/uia_query.php?noframes=x&amp;page_len=25&amp;max_docs=all&amp;db_group=ushmm&amp;db_name=photos&amp;db_name=wlc&amp;db_name=fvarchive&amp;db_name=website&amp;query=51008&amp;query_append=type(photo+or+histphoto+or+instphoto)">51008</a></span></li>
+<li><span class="identifier"><a rel="nofollow" class="external text" 
href="http://www.ushmm.org";>United States Holocaust Memorial Museum</a>, 
Photograph #<a rel="nofollow" class="external text" 
href="http://www.ushmm.org/search/results/?q=51008";>51008</a></span></li>
 </ul>
 </td>
 </tr>
@@ -34,7 +33,7 @@
 <td class="fileinfo-paramfield">References</td>
 <td>
 <ul>
-<li><cite class="book" style="font-style:normal"><a 
href="//en.wikipedia.org/wiki/pl:Stanis%C5%82aw_Piotrowski" class="extiw" 
title="w:pl:Stanisław Piotrowski">Stanisław Piotrowski</a> (<time 
class="dtstart" datetime="1948">1948</time>) <i>Sprawozdanie Juergena 
Stroopa</i>, <a href="//en.wikipedia.org/wiki/Warsaw" class="extiw" 
title="en:Warsaw">Warsaw</a>:  Spółdzielnia Wydawnicza Książka <small>no 
ISBN</small></cite></li>
+<li><cite class="book" style="font-style:normal"><a 
href="//en.wikipedia.org/wiki/pl:Stanis%C5%82aw_Piotrowski" class="extiw" 
title="w:pl:Stanisław Piotrowski">Stanisław Piotrowski</a> (<span 
style="white-space:nowrap"><time class="dtstart" 
datetime="1948">1948</time></span>) <i>Sprawozdanie Juergena Stroopa</i>, <a 
href="//en.wikipedia.org/wiki/Warsaw" class="extiw" 
title="en:Warsaw">Warsaw</a>:  Spółdzielnia Wydawnicza Książka <small>no 
ISBN</small></cite></li>
 <li><a href="//en.wikipedia.org/wiki/pl:Ruta_Sakowska" class="extiw" 
title="w:pl:Ruta Sakowska">Ruta Sakowska</a> (1988). <i>The Warsaw Ghetto - The 
45th Anniversary of the Uprising</i>. Warsaw: Interpress Publishers; <a 
href="//commons.wikimedia.org/wiki/Special:BookSources/8390150115" 
class="internal mw-magiclink-isbn">ISBN 8390150115</a></li>
 </ul>
 </td>
@@ -44,21 +43,21 @@
 <td><a rel="nofollow" class="external free" 
href="http://research.archives.gov/description/6003996";>http://research.archives.gov/description/6003996</a></td>
 </tr>
 </table>
-</div>
+<p><br /></p>
 <h2><span class="mw-headline" id="Book">Book</span><span 
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a 
href="//commons.wikimedia.org/w/index.php?title=File:Askaris_im_Warschauer_Getto_-_1943.jpg&amp;action=edit&amp;section=2"
 title="Edit section: Book">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
-<div class="hproduct">
-<table class="toccolours vevent" style="width: 100%; direction: ltr;" 
cellpadding="2">
+<div class="hproduct commons-file-information-table">
+<table class="fileinfotpl-type-book toccolours vevent" style="width: 100%; 
direction: ltr;" cellpadding="2">
 <tr valign="top">
 <td id="fileinfotpl_aut" class="fileinfo-paramfield">Author</td>
 <td>
 <p><a href="//en.wikipedia.org/wiki/J%C3%BCrgen_Stroop" class="extiw" 
title="w:Jürgen Stroop">Jürgen Stroop</a></p>
 </td>
 <td rowspan="17" style="text-align: right;">
-<p><span class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/Template:Stroop_Report" 
title="Template:Stroop Report"><img alt="Template:Stroop Report" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/20px-Blue_pencil.svg.png"
 width="20" height="20" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/30px-Blue_pencil.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/40px-Blue_pencil.svg.png
 2x" /></a></span></p>
+<p><span class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/Template:Stroop_Report" 
title="Template:Stroop Report"><img alt="Template:Stroop Report" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/20px-Blue_pencil.svg.png"
 width="20" height="20" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/30px-Blue_pencil.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/40px-Blue_pencil.svg.png
 2x" data-file-width="600" data-file-height="600" /></a></span></p>
 <div class="thumb tright">
-<div class="thumbinner" style="width:202px;"><span 
class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/File:Stroop_Report_-_Cover_Page.jpg" 
class="image"><img alt="" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/3/36/Stroop_Report_-_Cover_Page.jpg/200px-Stroop_Report_-_Cover_Page.jpg"
 width="200" height="269" class="thumbimage" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/36/Stroop_Report_-_Cover_Page.jpg/300px-Stroop_Report_-_Cover_Page.jpg
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/3/36/Stroop_Report_-_Cover_Page.jpg/400px-Stroop_Report_-_Cover_Page.jpg
 2x" /></a></span>
+<div class="thumbinner" style="width:202px;"><span 
class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/File:Stroop_Report_-_Cover_Page.jpg" 
class="image"><img alt="" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/3/36/Stroop_Report_-_Cover_Page.jpg/200px-Stroop_Report_-_Cover_Page.jpg"
 width="200" height="269" class="thumbimage" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/3/36/Stroop_Report_-_Cover_Page.jpg/300px-Stroop_Report_-_Cover_Page.jpg
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/3/36/Stroop_Report_-_Cover_Page.jpg/400px-Stroop_Report_-_Cover_Page.jpg
 2x" data-file-width="2598" data-file-height="3500" /></a></span>
 <div class="thumbcaption">
-<div class="magnify"><span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/File:Stroop_Report_-_Cover_Page.jpg" 
class="internal" title="Enlarge"><img 
src="//bits.wikimedia.org/static-1.23wmf8/skins/common/images/magnify-clip.png" 
width="15" height="11" alt="" /></a></span></div>
+<div class="magnify"><span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/File:Stroop_Report_-_Cover_Page.jpg" 
class="internal" title="Enlarge"></a></span></div>
 <span class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/File:Stroop_Report_-_Cover_Page.jpg" 
title="File:Stroop Report - Cover Page.jpg">Start this Book</a></span></div>
 </div>
 </div>
@@ -91,10 +90,10 @@
 <div class="vcard">
 <table class="toccolours collapsible collapsed" cellpadding="2" 
cellspacing="0" style="direction:ltr; text-align:left; 
border-collapse:collapse; background:#f0f0ff; border:1px solid #aaa;">
 <tr valign="top">
-<th colspan="3" style="background-color:#e0e0ee; font-weight:bold; border:1px 
solid #aaa;"><span class="fn"><a 
href="//en.wikipedia.org/wiki/National_Archives_and_Records_Administration" 
class="extiw" title="en:National Archives and Records Administration">National 
Archives and Records Administration</a></span>&#160;<span 
class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/Institution:National_Archives_and_Records_Administration"
 title="Link back to Institution infobox template"><img alt="Link back to 
Institution infobox template" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/15px-Blue_pencil.svg.png"
 width="15" height="15" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/23px-Blue_pencil.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/30px-Blue_pencil.svg.png
 2x" /></a></span>&#160;<span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a href="//www.wikidata.org/wiki/Q518155" 
title="wikidata:Q518155"><img alt="wikidata:Q518155" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/20px-Wikidata-logo.svg.png"
 width="20" height="11" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/30px-Wikidata-logo.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/40px-Wikidata-logo.svg.png
 2x" /></a></span></th>
+<th colspan="3" style="background-color:#e0e0ee; font-weight:bold; border:1px 
solid #aaa;"><span class="fn"><a 
href="//en.wikipedia.org/wiki/National_Archives_and_Records_Administration" 
class="extiw" title="en:National Archives and Records Administration">National 
Archives and Records Administration</a></span>&#160;<span 
class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/Institution:National_Archives_and_Records_Administration"
 title="Link back to Institution infobox template"><img alt="Link back to 
Institution infobox template" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/15px-Blue_pencil.svg.png"
 width="15" height="15" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/23px-Blue_pencil.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/30px-Blue_pencil.svg.png
 2x" data-file-width="600" data-file-height="600" /></a></span>&#160;<span 
class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//www.wikidata.org/wiki/Q518155" title="wikidata:Q518155"><img 
alt="wikidata:Q518155" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/20px-Wikidata-logo.svg.png"
 width="20" height="11" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/30px-Wikidata-logo.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/40px-Wikidata-logo.svg.png
 2x" data-file-width="1050" data-file-height="590" /></a></span></th>
 </tr>
 <tr valign="top">
-<td rowspan="8"><span class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/File:GLAMcamp_DC_2012_-_National_Archives_building_4.jpg"
 class="image"><img alt="GLAMcamp DC 2012 - National Archives building 4.jpg" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/5/58/GLAMcamp_DC_2012_-_National_Archives_building_4.jpg/180px-GLAMcamp_DC_2012_-_National_Archives_building_4.jpg"
 width="180" height="109" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/5/58/GLAMcamp_DC_2012_-_National_Archives_building_4.jpg/270px-GLAMcamp_DC_2012_-_National_Archives_building_4.jpg
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/5/58/GLAMcamp_DC_2012_-_National_Archives_building_4.jpg/360px-GLAMcamp_DC_2012_-_National_Archives_building_4.jpg
 2x" /></a></span></td>
+<td rowspan="8"><span class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/File:GLAMcamp_DC_2012_-_National_Archives_building_4.jpg"
 class="image"><img alt="GLAMcamp DC 2012 - National Archives building 4.jpg" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/5/58/GLAMcamp_DC_2012_-_National_Archives_building_4.jpg/180px-GLAMcamp_DC_2012_-_National_Archives_building_4.jpg"
 width="180" height="109" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/5/58/GLAMcamp_DC_2012_-_National_Archives_building_4.jpg/270px-GLAMcamp_DC_2012_-_National_Archives_building_4.jpg
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/5/58/GLAMcamp_DC_2012_-_National_Archives_building_4.jpg/360px-GLAMcamp_DC_2012_-_National_Archives_building_4.jpg
 2x" data-file-width="3330" data-file-height="2017" /></a></span></td>
 </tr>
 <tr valign="top">
 <td style="background:#e0e0ee; border:1px solid #aaa; 
font-weight:bold;">Native name</td>
@@ -106,11 +105,11 @@
 </tr>
 <tr valign="top">
 <td style="background:#e0e0ee; border:1px solid #aaa; 
font-weight:bold;">Coordinates</td>
-<td style="border:1px solid #aaa;">38°&#160;53′&#160;34.01″ N, 
77°&#160;01′&#160;22.71″ W&#160;<span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a 
href="http://maps.google.com/maps?hl=en&amp;q=38.892781,-77.022975&amp;tab=wl"; 
title="Link to Google Maps" rel="nofollow"><img alt="Link to Google Maps" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/16px-Google_favicon.svg.png"
 width="16" height="16" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/24px-Google_favicon.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/32px-Google_favicon.svg.png
 2x" /></a></span> &#160;<span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a 
href="http://www.openstreetmap.org/index.html?mlat=38.892781&amp;mlon=-77.022975&amp;zoom=17";
 title="Link to OpenStreetMap" rel="nofollow"><img alt="Link to OpenStreetMap" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/20px-Openstreetmap_logo.svg.png"
 width="20" height="20" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/30px-Openstreetmap_logo.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/40px-Openstreetmap_logo.svg.png
 2x" /></a></span></td>
+<td style="border:1px solid #aaa;">38°&#160;53′&#160;34.01″&#160;N, 
77°&#160;01′&#160;22.71″&#160;W&#160;<span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a 
href="http://www.openstreetmap.org/index.html?mlat=38.892781&amp;mlon=-77.022975&amp;zoom=17";
 title="Link to OpenStreetMap" rel="nofollow"><img alt="Link to OpenStreetMap" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/20px-Openstreetmap_logo.svg.png"
 width="20" height="20" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/30px-Openstreetmap_logo.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/40px-Openstreetmap_logo.svg.png
 2x" data-file-width="256" data-file-height="256" /></a></span> &#160;<span 
class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="http://maps.google.com/maps?hl=en&amp;q=38.892781,-77.022975&amp;tab=wl"; 
title="Link to Google Maps" rel="nofollow"><img alt="Link to Google Maps" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/16px-Google_favicon.svg.png"
 width="16" height="16" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/24px-Google_favicon.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/32px-Google_favicon.svg.png
 2x" data-file-width="674" data-file-height="692" /></a></span></td>
 </tr>
 <tr valign="top">
 <td style="background:#e0e0ee; border:1px solid #aaa; 
font-weight:bold;">Established</td>
-<td style="border:1px solid #aaa;"><time class="dtstart" 
datetime="1934">1934</time></td>
+<td style="border:1px solid #aaa;"><span style="white-space:nowrap"><time 
class="dtstart" datetime="1934">1934</time></span></td>
 </tr>
 <tr valign="top">
 <td style="background:#e0e0ee; border:1px solid #aaa; 
font-weight:bold;">Website</td>
@@ -136,10 +135,10 @@
 <div class="vcard">
 <table class="toccolours collapsible collapsed" cellpadding="2" 
cellspacing="0" style="direction:ltr; text-align:left; 
border-collapse:collapse; background:#f0f0ff; border:1px solid #aaa;">
 <tr valign="top">
-<th colspan="3" style="background-color:#e0e0ee; font-weight:bold; border:1px 
solid #aaa;"><span class="fn">Polish <a 
href="//en.wikipedia.org/wiki/Institute_of_National_Remembrance" class="extiw" 
title="en:Institute of National Remembrance">Institute of National 
Remembrance</a></span>&#160;<span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/Institution:Institute_of_National_Remembrance"
 title="Link back to Institution infobox template"><img alt="Link back to 
Institution infobox template" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/15px-Blue_pencil.svg.png"
 width="15" height="15" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/23px-Blue_pencil.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/30px-Blue_pencil.svg.png
 2x" /></a></span></th>
+<th colspan="3" style="background-color:#e0e0ee; font-weight:bold; border:1px 
solid #aaa;"><span class="fn">Polish <a 
href="//en.wikipedia.org/wiki/Institute_of_National_Remembrance" class="extiw" 
title="en:Institute of National Remembrance">Institute of National 
Remembrance</a></span>&#160;<span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/Institution:Institute_of_National_Remembrance"
 title="Link back to Institution infobox template"><img alt="Link back to 
Institution infobox template" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/15px-Blue_pencil.svg.png"
 width="15" height="15" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/23px-Blue_pencil.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/7/73/Blue_pencil.svg/30px-Blue_pencil.svg.png
 2x" data-file-width="600" data-file-height="600" /></a></span>&#160;<span 
class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//www.wikidata.org/wiki/Q705173" title="wikidata:Q705173"><img 
alt="wikidata:Q705173" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/20px-Wikidata-logo.svg.png"
 width="20" height="11" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/30px-Wikidata-logo.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Wikidata-logo.svg/40px-Wikidata-logo.svg.png
 2x" data-file-width="1050" data-file-height="590" /></a></span></th>
 </tr>
 <tr valign="top">
-<td rowspan="8"><span class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/File:Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG"
 class="image"><img alt="Akta Instytut Pamięci Narodowej 05.JPG" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG/180px-Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG"
 width="180" height="120" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG/270px-Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG/360px-Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG
 2x" /></a></span></td>
+<td rowspan="8"><span class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="//commons.wikimedia.org/wiki/File:Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG"
 class="image"><img alt="Akta Instytut Pamięci Narodowej 05.JPG" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG/180px-Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG"
 width="180" height="120" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG/270px-Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG/360px-Akta_Instytut_Pami%C4%99ci_Narodowej_05.JPG
 2x" data-file-width="4750" data-file-height="3167" /></a></span></td>
 </tr>
 <tr valign="top">
 <td style="background:#e0e0ee; border:1px solid #aaa; 
font-weight:bold;">Native name</td>
@@ -151,11 +150,11 @@
 </tr>
 <tr valign="top">
 <td style="background:#e0e0ee; border:1px solid #aaa; 
font-weight:bold;">Coordinates</td>
-<td style="border:1px solid #aaa;">52°&#160;13′&#160;52″ N, 
20°&#160;59′&#160;06.4″ E&#160;<span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a 
href="http://maps.google.com/maps?hl=en&amp;q=52.231111,20.985111&amp;tab=wl"; 
title="Link to Google Maps" rel="nofollow"><img alt="Link to Google Maps" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/16px-Google_favicon.svg.png"
 width="16" height="16" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/24px-Google_favicon.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/32px-Google_favicon.svg.png
 2x" /></a></span> &#160;<span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a 
href="http://www.openstreetmap.org/index.html?mlat=52.231111&amp;mlon=20.985111&amp;zoom=17";
 title="Link to OpenStreetMap" rel="nofollow"><img alt="Link to OpenStreetMap" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/20px-Openstreetmap_logo.svg.png"
 width="20" height="20" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/30px-Openstreetmap_logo.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/40px-Openstreetmap_logo.svg.png
 2x" /></a></span></td>
+<td style="border:1px solid #aaa;">52°&#160;13′&#160;52″&#160;N, 
20°&#160;59′&#160;06.4″&#160;E&#160;<span class="wpImageAnnotatorControl 
wpImageAnnotatorOff"><a 
href="http://www.openstreetmap.org/index.html?mlat=52.231111&amp;mlon=20.985111&amp;zoom=17";
 title="Link to OpenStreetMap" rel="nofollow"><img alt="Link to OpenStreetMap" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/20px-Openstreetmap_logo.svg.png"
 width="20" height="20" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/30px-Openstreetmap_logo.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Openstreetmap_logo.svg/40px-Openstreetmap_logo.svg.png
 2x" data-file-width="256" data-file-height="256" /></a></span> &#160;<span 
class="wpImageAnnotatorControl wpImageAnnotatorOff"><a 
href="http://maps.google.com/maps?hl=en&amp;q=52.231111,20.985111&amp;tab=wl"; 
title="Link to Google Maps" rel="nofollow"><img alt="Link to Google Maps" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/16px-Google_favicon.svg.png"
 width="16" height="16" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/24px-Google_favicon.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Google_favicon.svg/32px-Google_favicon.svg.png
 2x" data-file-width="674" data-file-height="692" /></a></span></td>
 </tr>
 <tr valign="top">
 <td style="background:#e0e0ee; border:1px solid #aaa; 
font-weight:bold;">Established</td>
-<td style="border:1px solid #aaa;"><time class="dtstart" 
datetime="1999">1999</time></td>
+<td style="border:1px solid #aaa;"><span style="white-space:nowrap"><time 
class="dtstart" datetime="1999">1999</time></span></td>
 </tr>
 <tr valign="top">
 <td style="background:#e0e0ee; border:1px solid #aaa; 
font-weight:bold;">Website</td>
@@ -183,11 +182,11 @@
 </tr>
 </table>
 </div>
-<div class="hproduct">
-<table class="toccolours vevent mw-content-ltr" dir="ltr" style="width: 100%" 
cellpadding="4">
+<div class="hproduct commons-file-information-table">
+<table class="fileinfotpl-type-artwork toccolours vevent mw-content-ltr" 
dir="ltr" style="width: 100%" cellpadding="4">
 <tr valign="top">
 <td id="fileinfotpl_date" class="fileinfo-paramfield">Date</td>
-<td><time class="dtstart" datetime="1943-05">May 1943</time></td>
+<td><span style="white-space:nowrap"><time class="dtstart" 
datetime="1943-05">May 1943</time></span></td>
 </tr>
 <tr valign="top">
 <td id="fileinfotpl_art_object_history" class="fileinfo-paramfield">Object 
history</td>
@@ -196,11 +195,11 @@
 <li>1943: Three leather bound albums were created for <a 
href="//en.wikipedia.org/wiki/Heinrich_Himmler" class="extiw" title="w:Heinrich 
Himmler">Heinrich Himmler</a>, <a 
href="//en.wikipedia.org/wiki/Friedrich_Kr%C3%BCger" class="extiw" 
title="w:Friedrich Krüger">Friedrich Krueger</a> and <a 
href="//en.wikipedia.org/wiki/J%C3%BCrgen_Stroop" class="extiw" title="w:Jürgen 
Stroop">Jürgen Stroop</a>, and one unbound file copy of the report (das 
Konzept) remained in Warsaw, in the care of Chief of Staff Jesuiter.<sup 
id="cite_ref-Raskin26_4-0" class="reference"><a 
href="#cite_note-Raskin26-4">[4]</a></sup></li>
 <li>1945: According to statement given in 1945 by Stroop's adjutant Karl 
Kaleshke, to US authorities in Wiesbaden, he ordered Stroops copy of the report 
burnt with other secret documents in Burg Kranzberg.<sup 
id="cite_ref-Stempowski_1-1" class="reference"><a 
href="#cite_note-Stempowski-1">[1]</a></sup></li>
 <li>1945: After the war only two of the four copies were discovered, those 
belonging to Himler and Jesuiter<sup id="cite_ref-name_2-1" 
class="reference"><a href="#cite_note-name-2">[2]</a></sup>. Himler's copy went 
to Seventh Army Intelligence Center (SAIC) and Jesuiter's to Military 
Intelligence Research Section (MIRS) in London.<sup 
id="cite_ref-Stempowski_1-2" class="reference"><a 
href="#cite_note-Stempowski-1">[1]</a></sup>Several sources stated that German 
<a href="//en.wikipedia.org/wiki/German_Federal_Archives" class="extiw" 
title="en:German Federal Archives">Bundesarchiv</a> also had a copy in 
Koblenz<sup id="cite_ref-5" class="reference"><a 
href="#cite_note-5">[5]</a></sup><sup id="cite_ref-6" class="reference"><a 
href="#cite_note-6">[6]</a></sup><sup id="cite_ref-name_2-2" 
class="reference"><a href="#cite_note-name-2">[2]</a></sup>; however, in reply 
to several inquiries by Richard Raskin, Bundesarchiv stated that third copy of 
report was never in their possession<sup id="cite_ref-Raskin26_4-1" 
class="reference"><a href="#cite_note-Raskin26-4">[4]</a></sup>.</li>
-<li><time class="dtstart" datetime="1945-11">November 1945</time>: Both copies 
were exhibited at the International Military Tribunal in Nuremberg in November 
1945, sharing the document number 1061-PS, and used in the trial as “US Exhibit 
275”.<sup id="cite_ref-Raskin26_4-2" class="reference"><a 
href="#cite_note-Raskin26-4">[4]</a></sup></li>
+<li><span style="white-space:nowrap"><time class="dtstart" 
datetime="1945-11">November 1945</time></span>: Both copies were exhibited at 
the International Military Tribunal in Nuremberg in November 1945, sharing the 
document number 1061-PS, and used in the trial as “US Exhibit 275”.<sup 
id="cite_ref-Raskin26_4-2" class="reference"><a 
href="#cite_note-Raskin26-4">[4]</a></sup></li>
 <li>1947: Both copies were used at International Military Tribunal in 
Nuremberg in the trial of <a href="//en.wikipedia.org/wiki/Oswald_Pohl" 
class="extiw" title="en:Oswald Pohl">Oswald Pohl</a> as exhibit 503.</li>
-<li><time class="dtstart" datetime="1948-06-10">10 June 1948</time>: 
Himler/SAIC copy of the Stroop report and <a 
href="//en.wikipedia.org/wiki/Katzmann_Report" class="extiw" title="en:Katzmann 
Report">Katzmann Report</a> were handed over by Fred Niebergal, head of Office 
of Chief of Counsel for War Crimes – OCCWC, to Bernard Acht, head of Polish 
Military Mission in Nuremberg<sup id="cite_ref-Stempowski_1-3" 
class="reference"><a href="#cite_note-Stempowski-1">[1]</a></sup></li>
+<li><span style="white-space:nowrap"><time class="dtstart" 
datetime="1948-06-10">10 June 1948</time></span>: Himler/SAIC copy of the 
Stroop report and <a href="//en.wikipedia.org/wiki/Katzmann_Report" 
class="extiw" title="en:Katzmann Report">Katzmann Report</a> were handed over 
by Fred Niebergal, head of Office of Chief of Counsel for War Crimes – OCCWC, 
to Bernard Acht, head of Polish Military Mission in Nuremberg<sup 
id="cite_ref-Stempowski_1-3" class="reference"><a 
href="#cite_note-Stempowski-1">[1]</a></sup></li>
 <li>1948: Jesuiter/MIRS copy of the report went to <a 
href="//en.wikipedia.org/wiki/National_Archives_and_Records_Administration" 
class="extiw" title="w:National Archives and Records Administration">National 
Archives</a> (NARA) in Washington, D.C., where it remains<sup 
id="cite_ref-Raskin26_4-3" class="reference"><a 
href="#cite_note-Raskin26-4">[4]</a></sup></li>
-<li><time class="dtstart" datetime="1951-07">July 1951</time>: The Warsaw 
(Himler/SAIC) copy of the report was used in <a 
href="//en.wikipedia.org/wiki/J%C3%BCrgen_Stroop" class="extiw" 
title="en:Jürgen Stroop">Jürgen Stroop</a> trial at Warsaw Criminal District 
Court<sup id="cite_ref-name_2-3" class="reference"><a 
href="#cite_note-name-2">[2]</a></sup> and transferred afterwards to KC <a 
href="//en.wikipedia.org/wiki/Polish_United_Workers%27_Party" class="extiw" 
title="en:Polish United Workers' Party">PZPR</a> archive.<sup 
id="cite_ref-Stempowski_1-4" class="reference"><a 
href="#cite_note-Stempowski-1">[1]</a></sup></li>
+<li><span style="white-space:nowrap"><time class="dtstart" 
datetime="1951-07">July 1951</time></span>: The Warsaw (Himler/SAIC) copy of 
the report was used in <a href="//en.wikipedia.org/wiki/J%C3%BCrgen_Stroop" 
class="extiw" title="en:Jürgen Stroop">Jürgen Stroop</a> trial at Warsaw 
Criminal District Court<sup id="cite_ref-name_2-3" class="reference"><a 
href="#cite_note-name-2">[2]</a></sup> and transferred afterwards to KC <a 
href="//en.wikipedia.org/wiki/Polish_United_Workers%27_Party" class="extiw" 
title="en:Polish United Workers' Party">PZPR</a> archive.<sup 
id="cite_ref-Stempowski_1-4" class="reference"><a 
href="#cite_note-Stempowski-1">[1]</a></sup></li>
 <li>1952: The Warsaw copy is transferred to "Główna Komisja Badania Zbrodni 
Hitlerowskich w Polsce" and it successor <a 
href="//pl.wikipedia.org/wiki/Instytut_Pami%C4%99ci_Narodowej" class="extiw" 
title="pl:Instytut Pamięci Narodowej">Instytut Pamięci Narodowej – Komisja 
Ścigania Zbrodni przeciwko Narodowi Polskiemu</a> where it remains. <sup 
id="cite_ref-Stempowski_1-5" class="reference"><a 
href="#cite_note-Stempowski-1">[1]</a></sup></li>
 </ul>
 </td>
@@ -210,7 +209,7 @@
 <td>
 <p>Text of the report and the photographs can be found at:</p>
 <ul>
-<li><cite class="book" style="font-style:normal"><a 
href="//en.wikipedia.org/wiki/pl:Stanis%C5%82aw_Piotrowski" class="extiw" 
title="w:pl:Stanisław Piotrowski">Stanisław Piotrowski</a> (<time 
class="dtstart" datetime="1948">1948</time>) <i>Sprawozdanie Juergena 
Stroopa</i>, <a href="//en.wikipedia.org/wiki/Warsaw" class="extiw" 
title="en:Warsaw">Warsaw</a>:  Spółdzielnia Wydawnicza Książka, pp.&#160;s. 79 
<small>no ISBN</small></cite> (Polish translation, partial)</li>
+<li><cite class="book" style="font-style:normal"><a 
href="//en.wikipedia.org/wiki/pl:Stanis%C5%82aw_Piotrowski" class="extiw" 
title="w:pl:Stanisław Piotrowski">Stanisław Piotrowski</a> (<span 
style="white-space:nowrap"><time class="dtstart" 
datetime="1948">1948</time></span>) <i>Sprawozdanie Juergena Stroopa</i>, <a 
href="//en.wikipedia.org/wiki/Warsaw" class="extiw" 
title="en:Warsaw">Warsaw</a>:  Spółdzielnia Wydawnicza Książka, pp.&#160;s. 79 
<small>no ISBN</small></cite> (Polish translation, partial)</li>
 <li><a rel="nofollow" class="external text" 
href="http://pamiec.pl/ftp/ilustracje/Raport_STROOPA.pdf";>Institute of National 
Remembrance website</a>: Warsaw copy; German original and Polish 
translation</li>
 <li><a rel="nofollow" class="external text" 
href="http://www.holocaust-history.org/works/stroop-report/htm/strp001.htm.en";>www.holocaust-history.org</a>
 Warsaw copy; German original and English translation</li>
 <li><a rel="nofollow" class="external text" 
href="http://research.archives.gov/description/6003996";>National Archives 
website</a> NARA copy<sup id="cite_ref-NARA_3-1" class="reference"><a 
href="#cite_note-NARA-3">[3]</a></sup>; German original</li>
@@ -221,10 +220,10 @@
 <div class="reflist" style="list-style-type: decimal;">
 <ol class="references">
 <li id="cite_note-Stempowski-1"><span class="mw-cite-backlink">↑ <a 
href="#cite_ref-Stempowski_1-0"><sup><i><b>a</b></i></sup></a> <a 
href="#cite_ref-Stempowski_1-1"><sup><i><b>b</b></i></sup></a> <a 
href="#cite_ref-Stempowski_1-2"><sup><i><b>c</b></i></sup></a> <a 
href="#cite_ref-Stempowski_1-3"><sup><i><b>d</b></i></sup></a> <a 
href="#cite_ref-Stempowski_1-4"><sup><i><b>e</b></i></sup></a> <a 
href="#cite_ref-Stempowski_1-5"><sup><i><b>f</b></i></sup></a></span> <span 
class="reference-text">Tomasz Stempowski (<span class="mw-formatted-date" 
title="2013-03-17">2013-03-17</span>). <a rel="nofollow" class="external text" 
href="http://fototekst.pl/zdjecia-z-powstania-w-getcie/";>Zdjęcia z powstania w 
getcie</a>. fototekst.pl. Retrieved on <span class="mw-formatted-date" 
title="2013-10-08">2013-10-08</span>.</span></li>
-<li id="cite_note-name-2"><span class="mw-cite-backlink">↑ <a 
href="#cite_ref-name_2-0"><sup><i><b>a</b></i></sup></a> <a 
href="#cite_ref-name_2-1"><sup><i><b>b</b></i></sup></a> <a 
href="#cite_ref-name_2-2"><sup><i><b>c</b></i></sup></a> <a 
href="#cite_ref-name_2-3"><sup><i><b>d</b></i></sup></a></span> <span 
class="reference-text"><cite class="book" style="font-style:normal"><a 
href="//en.wikipedia.org/wiki/J%C3%BCrgen_Stroop" class="extiw" title="w:Jürgen 
Stroop">Jürgen Stroop</a> (<time class="dtstart" datetime="2009">2009</time>) 
Andrzej Żbikowski , ed. <i><a rel="nofollow" class="external text" 
href="http://pamiec.pl/ftp/ilustracje/Raport_STROOPA.pdf";>Żydowska dzielnica 
mieszkaniowa w Warszawie już nie istnieje!<br />
+<li id="cite_note-name-2"><span class="mw-cite-backlink">↑ <a 
href="#cite_ref-name_2-0"><sup><i><b>a</b></i></sup></a> <a 
href="#cite_ref-name_2-1"><sup><i><b>b</b></i></sup></a> <a 
href="#cite_ref-name_2-2"><sup><i><b>c</b></i></sup></a> <a 
href="#cite_ref-name_2-3"><sup><i><b>d</b></i></sup></a></span> <span 
class="reference-text"><cite class="book" style="font-style:normal"><a 
href="//en.wikipedia.org/wiki/J%C3%BCrgen_Stroop" class="extiw" title="w:Jürgen 
Stroop">Jürgen Stroop</a> (<span style="white-space:nowrap"><time 
class="dtstart" datetime="2009">2009</time></span>) Andrzej Żbikowski , ed. 
<i><a rel="nofollow" class="external text" 
href="http://pamiec.pl/ftp/ilustracje/Raport_STROOPA.pdf";>Żydowska dzielnica 
mieszkaniowa w Warszawie już nie istnieje!<br />
 Es gibt keinen jüdischen Wohnbezirk in Warschau mehr!</a></i>, <a 
href="//en.wikipedia.org/wiki/Warsaw" class="extiw" 
title="en:Warsaw">Warsaw</a>:  <a 
href="//pl.wikipedia.org/wiki/Instytut_Pami%C4%99ci_Narodowej" class="extiw" 
title="pl:Instytut Pamięci Narodowej">Instytut Pamięci Narodowej</a>, Żydowski 
Instytut Historyczny, pp.&#160;10-18 </cite></span></li>
 <li id="cite_note-NARA-3"><span class="mw-cite-backlink">↑ <a 
href="#cite_ref-NARA_3-0"><sup><i><b>a</b></i></sup></a> <a 
href="#cite_ref-NARA_3-1"><sup><i><b>b</b></i></sup></a></span> <span 
class="reference-text"><a rel="nofollow" class="external text" 
href="http://research.archives.gov/description/6003996";>Stroop Report, 
04/1943</a>. <a 
href="//en.wikipedia.org/wiki/National_Archives_and_Records_Administration" 
class="extiw" title="w:National Archives and Records 
Administration">NARA</a>.</span></li>
-<li id="cite_note-Raskin26-4"><span class="mw-cite-backlink">↑ <a 
href="#cite_ref-Raskin26_4-0"><sup><i><b>a</b></i></sup></a> <a 
href="#cite_ref-Raskin26_4-1"><sup><i><b>b</b></i></sup></a> <a 
href="#cite_ref-Raskin26_4-2"><sup><i><b>c</b></i></sup></a> <a 
href="#cite_ref-Raskin26_4-3"><sup><i><b>d</b></i></sup></a></span> <span 
class="reference-text"><cite class="book" style="font-style:normal">Richard 
Raskin (<time class="dtstart" datetime="2004">2004</time>) <i><a rel="nofollow" 
class="external text" 
href="http://www.amazon.com/Child-at-Gunpoint-Richard-Raskin/dp/8779340997/ref=sr_1_1?ie=UTF8&amp;qid=1381234349&amp;sr=8-1&amp;keywords=child+at+gunpoint";>A
 Child at Gunpoint: A Case Study in the Life of a Photo</a></i>, Aarhus 
University Press</cite> (<a rel="nofollow" class="external text" 
href="http://holocaustcontroversies.blogspot.com/2007/09/stroop-report-is-forgery-part-1.html";>excerpts</a>)</span></li>
+<li id="cite_note-Raskin26-4"><span class="mw-cite-backlink">↑ <a 
href="#cite_ref-Raskin26_4-0"><sup><i><b>a</b></i></sup></a> <a 
href="#cite_ref-Raskin26_4-1"><sup><i><b>b</b></i></sup></a> <a 
href="#cite_ref-Raskin26_4-2"><sup><i><b>c</b></i></sup></a> <a 
href="#cite_ref-Raskin26_4-3"><sup><i><b>d</b></i></sup></a></span> <span 
class="reference-text"><cite class="book" style="font-style:normal">Richard 
Raskin (<span style="white-space:nowrap"><time class="dtstart" 
datetime="2004">2004</time></span>) <i><a rel="nofollow" class="external text" 
href="http://www.amazon.com/Child-at-Gunpoint-Richard-Raskin/dp/8779340997/ref=sr_1_1?ie=UTF8&amp;qid=1381234349&amp;sr=8-1&amp;keywords=child+at+gunpoint";>A
 Child at Gunpoint: A Case Study in the Life of a Photo</a></i>, Aarhus 
University Press</cite> (<a rel="nofollow" class="external text" 
href="http://holocaustcontroversies.blogspot.com/2007/09/stroop-report-is-forgery-part-1.html";>excerpts</a>)</span></li>
 <li id="cite_note-5"><span class="mw-cite-backlink"><a 
href="#cite_ref-5">↑</a></span> <span class="reference-text"><a rel="nofollow" 
class="external text" 
href="http://collections.yadvashem.org/photosarchive/en-us/47893.html";>Yad 
Vashem Photo Archive</a></span></li>
 <li id="cite_note-6"><span class="mw-cite-backlink"><a 
href="#cite_ref-6">↑</a></span> <span class="reference-text"><a rel="nofollow" 
class="external text" 
href="http://resources.ushmm.org/inquery/uia_doc.php/photos/6443";>United States 
Holocaust Memorial Museum</a></span></li>
 </ol>
@@ -233,7 +232,7 @@
 </tr>
 </table>
 </div>
-<h2><span class="mw-headline" id="Licensing:"><a 
href="//commons.wikimedia.org/wiki/Commons:Copyright_tags" 
title="Commons:Copyright tags">Licensing</a>:</span><span 
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a 
href="//commons.wikimedia.org/w/index.php?title=File:Askaris_im_Warschauer_Getto_-_1943.jpg&amp;action=edit&amp;section=3"
 title="Edit section: Licensing:">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
+<h2><span class="mw-headline" id="Licensing">Licensing</span><span 
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a 
href="//commons.wikimedia.org/w/index.php?title=File:Askaris_im_Warschauer_Getto_-_1943.jpg&amp;action=edit&amp;section=3"
 title="Edit section: Licensing">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
 <table class="licensetpl" style="display:none">
 <tr>
 <td><span class="licensetpl_short">Public domain</span><span 
class="licensetpl_long">Public domain</span><span 
class="licensetpl_link_req">false</span><span 
class="licensetpl_attr_req">false</span></td>
@@ -241,19 +240,19 @@
 </table>
 <table cellspacing="8" cellpadding="0" style="width:100%; clear:both; 
margin:0.5em auto; background-color:#f7f8ff; border:2px solid #8888aa; 
direction: ltr;" class="layouttemplate mw-content-ltr">
 <tr>
-<td><img alt="Public domain" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/80px-PD-icon.svg.png"
 width="80" height="80" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/120px-PD-icon.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/160px-PD-icon.svg.png
 2x" /></td>
+<td><img alt="Public domain" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/80px-PD-icon.svg.png"
 width="80" height="80" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/120px-PD-icon.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/160px-PD-icon.svg.png
 2x" data-file-width="196" data-file-height="196" /></td>
 <td><span lang="en" class="description en">This photograph is in the <b><a 
href="//en.wikipedia.org/wiki/public_domain" class="extiw" title="w:public 
domain">public domain</a></b> because according to the <a 
href="//commons.wikimedia.org/wiki/File:Art.3_of_Polish_copyright_law_of_March_29,_1926.JPG"
 title="File:Art.3 of Polish copyright law of March 29, 1926.JPG">Art. 3</a> of 
<a 
href="//en.wikisource.org/wiki/pl:Prawo_autorskie_(ustawa_z_29_marca_1926_r.)" 
class="extiw" title="s:pl:Prawo autorskie (ustawa z 29 marca 1926 
r.)">copyright law of March 29, 1926</a> of the <a 
href="//en.wikipedia.org/wiki/Second_Polish_Republic" class="extiw" 
title="w:Second Polish Republic">Republic of Poland</a> and Art. 2 of <a 
href="//en.wikisource.org/wiki/pl:Prawo_autorskie_(ustawa_z_10_lipca_1952_r.)" 
class="extiw" title="s:pl:Prawo autorskie (ustawa z 10 lipca 1952 
r.)">copyright law of July 10, 1952</a> of the <a 
href="//en.wikipedia.org/wiki/People%27s_Republic_of_Poland" class="extiw" 
title="w:People's Republic of Poland">People's Republic of Poland</a>, all 
photographs by Polish photographers (or published for the first time in Poland 
or simultaneously in Poland and abroad) published without a clear copyright 
notice before the <a 
href="//en.wikisource.org/wiki/pl:Prawo_autorskie_(ustawa)" class="extiw" 
title="s:pl:Prawo autorskie (ustawa)">law was changed on May 23, 1994</a> are 
assumed <b><a href="//en.wikipedia.org/wiki/public_domain" class="extiw" 
title="w:public domain">public domain</a></b> in Poland.</span>
 <hr />
-<p><span lang="en" class="description en">This work is in the <b><a 
href="//en.wikipedia.org/wiki/public_domain" class="extiw" title="w:public 
domain">public domain</a></b> in the United States because it meets three 
requirements:</span></p>
+<p><span lang="en" class="description en">This work is in the <b><a 
href="//en.wikipedia.org/wiki/public_domain" class="extiw" title="en:public 
domain">public domain</a></b> in the United States because it meets three 
requirements:</span></p>
 <ol>
-<li><span lang="en" class="description en">it was first published outside the 
United States (and <i>not</i> published in the U.S. within 30 days)</span></li>
-<li><span lang="en" class="description en">it was first published before March 
1, 1989 without complying with U.S. copyright formalities</span></li>
-<li><span lang="en" class="description en">it was in the public domain in its 
home country (Poland) on the <a href="//en.wikipedia.org/wiki/URAA" 
class="extiw" title="w:URAA">URAA</a> date (January 1, 1996).</span></li>
+<li><span lang="en" class="description en">it was first <a 
href="//commons.wikimedia.org/wiki/Commons:Publication" 
title="Commons:Publication">published</a> outside the United States (and 
<i>not</i> published in the U.S. within 30 days),</span></li>
+<li><span lang="en" class="description en">it was first published before 1978 
without complying with U.S. copyright formalities or after 1978 without 
copyright notice,</span></li>
+<li><span lang="en" class="description en">it was in the public domain in its 
home country (<a href="//en.wikipedia.org/wiki/Poland" class="extiw" 
title="en:Poland">Poland</a>) on the <a href="//en.wikipedia.org/wiki/URAA" 
class="extiw" title="en:URAA">URAA</a> date (<span 
style="white-space:nowrap"><time class="dtstart" datetime="1996-01-01">1 
January 1996</time></span>).</span></li>
 </ol>
-<center><span lang="en" class="description en">To uploader: <b>Please provide 
where and when the image was first published.</b></span></center>
+<center>To uploader: <b>Please provide where and when the image was first 
published.</b></center>
 </td>
 <td>
-<div class="floatright"><img alt="Godlo PRL.svg" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/2/26/Godlo_PRL.svg/80px-Godlo_PRL.svg.png"
 width="80" height="94" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/2/26/Godlo_PRL.svg/120px-Godlo_PRL.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/2/26/Godlo_PRL.svg/160px-Godlo_PRL.svg.png
 2x" /></div>
+<div class="floatright"><img alt="Godlo PRL.svg" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/2/26/Godlo_PRL.svg/80px-Godlo_PRL.svg.png"
 width="80" height="94" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/2/26/Godlo_PRL.svg/120px-Godlo_PRL.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/2/26/Godlo_PRL.svg/160px-Godlo_PRL.svg.png
 2x" data-file-width="808" data-file-height="951" /></div>
 </td>
 </tr>
 </table>
@@ -264,12 +263,12 @@
 </table>
 <table cellspacing="8" cellpadding="0" style="width:100%; clear:both; 
margin:0.5em auto; background-color:#f7f8ff; border:2px solid #8888aa; 
direction: ltr;" class="layouttemplate mw-content-ltr">
 <tr>
-<td width="70px"><img alt="Public domain" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/64px-PD-icon.svg.png"
 width="64" height="64" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/96px-PD-icon.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/128px-PD-icon.svg.png
 2x" /></td>
+<td width="70px"><img alt="Public domain" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/64px-PD-icon.svg.png"
 width="64" height="64" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/96px-PD-icon.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/6/62/PD-icon.svg/128px-PD-icon.svg.png
 2x" data-file-width="196" data-file-height="196" /></td>
 <td><span lang="en" class="description en"><i>This file is in the <b><a 
href="//en.wikipedia.org/wiki/public_domain" class="extiw" title="w:public 
domain">public domain</a></b></i>, <b>because</b> <b>released to the public 
domain by the United States Holocaust Memorial Museum</b><i><br /></i></span>
 <p><span lang="en" class="description en">In case this is not legally 
possible:</span><br />
 <i>The right to use this work is granted to <b>anyone for any purpose</b>, 
without any conditions, unless such conditions are required by law.</i></p>
 <hr />
-<p><img alt="Dialog-warning.svg" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Dialog-warning.svg/26px-Dialog-warning.svg.png"
 width="26" height="26" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Dialog-warning.svg/39px-Dialog-warning.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Dialog-warning.svg/52px-Dialog-warning.svg.png
 2x" /> <small><span lang="en" class="description en">Please verify that the 
reason given above complies with Commons' <a 
href="//commons.wikimedia.org/wiki/Commons:Licensing" 
title="Commons:Licensing">licensing policy</a>.</span></small></p>
+<p><img alt="Dialog-warning.svg" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Dialog-warning.svg/26px-Dialog-warning.svg.png"
 width="26" height="26" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Dialog-warning.svg/39px-Dialog-warning.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Dialog-warning.svg/52px-Dialog-warning.svg.png
 2x" data-file-width="42" data-file-height="42" /> <small><span lang="en" 
class="description en">Please verify that the reason given above complies with 
Commons' <a href="//commons.wikimedia.org/wiki/Commons:Licensing" 
title="Commons:Licensing">licensing policy</a>.</span></small></p>
 </td>
 </tr>
 </table>
@@ -277,18 +276,32 @@
 
 <!-- 
 NewPP limit report
-Parsed by mw1082
-CPU time usage: 2.884 seconds
-Real time usage: 3.032 seconds
-Preprocessor visited node count: 12604/1000000
-Preprocessor generated node count: 83736/1500000
-Post‐expand include size: 150711/2048000 bytes
-Template argument size: 82747/2048000 bytes
-Highest expansion depth: 24/40
-Expensive parser function count: 4/500
-Lua time usage: 0.217s
-Lua memory usage: 1.33 MB
+Parsed by mw1187
+CPU time usage: 2.000 seconds
+Real time usage: 3.091 seconds
+Preprocessor visited node count: 12640/1000000
+Preprocessor generated node count: 102672/1500000
+Post‐expand include size: 158562/2097152 bytes
+Template argument size: 81704/2097152 bytes
+Highest expansion depth: 23/40
+Expensive parser function count: 5/500
+Lua time usage: 0.326/10.000 seconds
+Lua memory usage: 2.17 MB/50 MB
 -->
 
-<!-- Saved in parser cache with key 
commonswiki:pcache:idhash:1917825-1!*!0!default!!en!4!* and timestamp 
20131231175816
+<!-- 
+Transclusion expansion time report (%,ms,calls,template)
+100.00% 12441.155      1 - -total
+ 11.50% 1430.639      1 - Template:Stroop_Report
+  8.20% 1019.979      1 - Template:Photograph
+  6.07%  755.180      1 - Template:Book
+  5.36%  667.056      1 - Template:Artwork
+  4.32%  537.761      2 - Template:Institution
+  4.17%  519.139      2 - Template:Institution/en
+  4.15%  516.634     11 - Template:Cite_book/label
+  4.14%  514.993      4 - Template:Cite_book
+  4.12%  512.618      2 - Template:Institution/layout
+-->
+
+<!-- Saved in parser cache with key 
commonswiki:pcache:idhash:1917825-1!*!0!default!!en!4!* and timestamp 
20141126233320 and revision id 128325377
  -->
diff --git a/tests/html/File_Bust_of_Wilhelmine_of_Bayreuth.jpg.html 
b/tests/html/File_Bust_of_Wilhelmine_of_Bayreuth.jpg.html
new file mode 100644
index 0000000..1543cb2
--- /dev/null
+++ b/tests/html/File_Bust_of_Wilhelmine_of_Bayreuth.jpg.html
@@ -0,0 +1,162 @@
+<h2><span class="mw-headline" id="Object">Object</span></h2>
+<div class="hproduct commons-file-information-table">
+<table class="fileinfotpl-type-artwork toccolours vevent mw-content-ltr" 
dir="ltr" style="width: 100%" cellpadding="4">
+<tr valign="top">
+<td id="fileinfotpl_aut" class="type fileinfo-paramfield">Artist</td>
+<td><span class="fn value">Gabriele Plössner</span></td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_desc" class="fileinfo-paramfield">Description</td>
+<td>
+<div class="description">
+<div class="description mw-content-ltr de" dir="ltr" lang="de" style=""><span 
class="language de" title="Deutsch"><b>Deutsch:</b></span> Bronzebüste der 
Markgräfin Wilhelmine von Bayreuth zwischen Schlosskirche und Opernhaus (im 
Hintergrund).</div>
+<div class="description mw-content-ltr en" dir="ltr" lang="en" style=""><span 
class="language en" title=""><b>English:</b></span> Bronze bust of Wilhelmine 
of Bayreuth, located between the <i>Schlosskirche</i> and the Opera House 
(background).</div>
+</div>
+</td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_date" class="fileinfo-paramfield">Date</td>
+<td><span style="white-space:nowrap"><time class="dtstart" 
datetime="1998">1998</time></span></td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_art_medium" class="fileinfo-paramfield">Medium</td>
+<td>bronze</td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_art_gallery" rowspan="2" 
class="fileinfo-paramfield">Current location</td>
+<td></td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_art_location"><span class="locality">Gontard-Anlage 
Bayreuth (<span class="plainlinks nourlexpansion"><a class="external text" 
href="http://tools.wmflabs.org/geohack/geohack.php?pagename=File:Bust_of_Wilhelmine_of_Bayreuth.jpg&amp;params=49.944208_N_11.577695_E_dim:100";><span
 class="geo-nondefault"><span class="geo-dms" title="Maps, aerial photos, and 
other data for this location"><span class="latitude">49°56′39″N</span> <span 
class="longitude">11°34′40″E</span></span></span><span 
class="geo-multi-punct"> / </span><span class="geo-default"><span 
class="geo-dec" title="Maps, aerial photos, and other data for this 
location">49.944208°N 11.577695°E</span><span style="display:none"> / <span 
class="geo">49.944208; 11.577695</span></span></span></a></span>)</span></td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_art_credit_line" class="fileinfo-paramfield">Credit 
line</td>
+<td>Gestiftet von dem Verein Markgräfliches Bayreuth</td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_art_inscriptions" 
class="fileinfo-paramfield">Inscriptions</td>
+<td><i>MARKGRÄFIN<br />
+WILHELMINE<br />
+1709 - 1758</i><br /></td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_perm" class="fileinfo-paramfield">Permission<br />
+<small>(<a 
href="//commons.wikimedia.org/wiki/Commons:Reusing_content_outside_Wikimedia" 
title="Commons:Reusing content outside Wikimedia">Reusing this 
file</a>)</small></td>
+<td>
+<table cellspacing="8" cellpadding="0" style="width:100%; clear:both; 
margin:0.5em auto; background-color:#e2f2d2; border:2px solid #acce79; 
direction: ltr;" class="layouttemplate foptemplate">
+<tr>
+<td style="width:64px"><img alt="SemiPD-icon.svg" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/4/43/SemiPD-icon.svg/50px-SemiPD-icon.svg.png"
 width="50" height="50" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/4/43/SemiPD-icon.svg/75px-SemiPD-icon.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/4/43/SemiPD-icon.svg/100px-SemiPD-icon.svg.png
 2x" data-file-width="196" data-file-height="196" />
+<p><img alt="Germany" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_Germany.svg/50px-Flag_of_Germany.svg.png"
 width="50" height="30" class="thumbborder" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_Germany.svg/75px-Flag_of_Germany.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_Germany.svg/100px-Flag_of_Germany.svg.png
 2x" data-file-width="1000" data-file-height="600" /></p>
+</td>
+<td><span lang="de" class="description de">The photographical reproduction of 
this work is covered under the article § 59 of the <a rel="nofollow" 
class="external text" href="http://bundesrecht.juris.de/urhg/index.html";>German 
copyright law</a>, which states that "It shall be permissible to reproduce, by 
painting, drawing, photography or cinematography, works which are permanently 
located on public ways, streets or places and to distribute and publicly 
communicate such copies. For works of architecture, this provision shall be 
applicable only to the external appearance."</span>
+<p><span lang="de" class="description de">See <a 
href="//commons.wikimedia.org/wiki/Commons:Freedom_of_Panorama#Germany" 
title="Commons:Freedom of Panorama" class="mw-redirect">Commons:Freedom of 
Panorama#Germany</a> for more information.</span></p>
+<hr />
+<p><span style="font-size:x-small;line-height:140%" class="plainlinks 
noprint"><a class="external text" 
href="//commons.wikimedia.org/wiki/Template:FoP-Germany/de">Deutsch</a>&#160;| 
<a class="external text" 
href="//commons.wikimedia.org/wiki/Template:FoP-Germany/en">English</a>&#160;| 
<a class="external text" 
href="//commons.wikimedia.org/wiki/Template:FoP-Germany/eo">Esperanto</a>&#160;|
 <a class="external text" 
href="//commons.wikimedia.org/wiki/Template:FoP-Germany/fr">français</a>&#160;| 
<a class="external text" 
href="//commons.wikimedia.org/wiki/Template:FoP-Germany/mk">македонски</a>&#160;|
 <a class="external text" 
href="//commons.wikimedia.org/wiki/Template:FoP-Germany/ru">русский</a>&#160;| 
<small class="plainlinks"><a class="external text" 
href="//commons.wikimedia.org/w/index.php?title=Template:FoP-Germany/lang&amp;action=edit">+/−</a></small></span></p>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</div>
+<h2><span class="mw-headline" id="Photograph">Photograph</span></h2>
+<div class="hproduct">
+<table class="fileinfotpl fileinfotpl-type-photograph toccolours hproduct 
vevent" style="width: 100%; direction: ltr;" cellpadding="2">
+<tr valign="top">
+<td id="fileinfotpl_date" class="fileinfo-paramfield">Date</td>
+<td><span style="white-space:nowrap"><time class="dtstart" 
datetime="2014-09-07">7 September 2014</time></span></td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_aut" class="fileinfo-paramfield type">Photographer</td>
+<td><span class="fn value"><a 
href="//commons.wikimedia.org/wiki/User:El_Grafo" title="User:El Grafo">El 
Grafo</a></span></td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_src" class="fileinfo-paramfield">Source</td>
+<td><span class="int-own-work">Own work</span></td>
+</tr>
+<tr valign="top">
+<td id="fileinfotpl_perm" class="fileinfo-paramfield">Permission<br />
+<small>(<a 
href="//commons.wikimedia.org/wiki/Commons:Reusing_content_outside_Wikimedia" 
title="Commons:Reusing content outside Wikimedia">Reusing this 
file</a>)</small></td>
+<td>
+<table cellspacing="8" cellpadding="0" style="clear:both; margin:0.5em auto; 
background-color:#f0f0f0; border:2px solid #e0e0e0; direction: ltr;" 
class="licensetpl_wrapper">
+<tr>
+<td>
+<div class="center"><b><span lang="en" class="description en"><span 
class="licensetpl_aut"><a href="//commons.wikimedia.org/wiki/User:El_Grafo" 
title="User:El Grafo">El Grafo</a></span>, the copyright holder of this work, 
hereby publishes it under the following license:</span></b></div>
+<table cellspacing="8" cellpadding="0" style="width:100%; clear:both; 
text-align:center; margin:0.5em auto; background-color:#f9f9f9; border:2px 
solid #e0e0e0" class="layouttemplate licensetpl mw-content-ltr">
+<tr>
+<td style="width:90px;" rowspan="3"><img alt="w:en:Creative Commons" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/90px-CC_some_rights_reserved.svg.png"
 width="90" height="36" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/135px-CC_some_rights_reserved.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/180px-CC_some_rights_reserved.svg.png
 2x" data-file-width="744" data-file-height="300" /><br />
+<img alt="attribution" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/24px-Cc-by_new_white.svg.png"
 width="24" height="24" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/36px-Cc-by_new_white.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/48px-Cc-by_new_white.svg.png
 2x" data-file-width="64" data-file-height="64" /> <img alt="share alike" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Cc-sa_white.svg/24px-Cc-sa_white.svg.png"
 width="24" height="24" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Cc-sa_white.svg/36px-Cc-sa_white.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Cc-sa_white.svg/48px-Cc-sa_white.svg.png
 2x" data-file-width="64" data-file-height="64" /></td>
+<td>This file is licensed under the <a 
href="//en.wikipedia.org/wiki/en:Creative_Commons" class="extiw" 
title="w:en:Creative Commons">Creative Commons</a> <a rel="nofollow" 
class="external text" 
href="//creativecommons.org/licenses/by-sa/4.0/deed.en">Attribution-Share Alike 
4.0 International</a> license.</td>
+<td style="width:90px;" rowspan="3"></td>
+</tr>
+<tr style="text-align:center;">
+<td><b>Attribution: <span style="font-size: larger;" class="licensetpl_attr">© 
<a class="external text" 
href="http://commons.wikimedia.org/wiki/User:El_Grafo";>El Grafo</a> / <a 
rel="nofollow" class="external text" 
href="http://creativecommons.org/licenses/by-sa/4.0/legalcode";>CC-BY-SA-4.0</a></span></b></td>
+</tr>
+<tr style="text-align:left;">
+<td>
+<dl>
+<dd>You are free:
+<ul>
+<li><b>to share</b> – to copy, distribute and transmit the work</li>
+<li><b>to remix</b> – to adapt the work</li>
+</ul>
+</dd>
+<dd>Under the following conditions:
+<ul>
+<li><b>attribution</b> – You must attribute the work in the manner specified 
by the author or licensor (but not in any way that suggests that they endorse 
you or your use of the work).</li>
+<li><b>share alike</b> – If you alter, transform, or build upon this work, you 
may distribute the resulting work only under the same or similar license to 
this one.</li>
+</ul>
+</dd>
+</dl>
+<p><span class="licensetpl_link" 
style="display:none;">http://creativecommons.org/licenses/by-sa/4.0</span> 
<span class="licensetpl_short" style="display:none;">CC-BY-SA-4.0</span> <span 
class="licensetpl_long" style="display:none;">Creative Commons 
Attribution-Share Alike 4.0</span> <span class="licensetpl_link_req" 
style="display:none;">true</span><span class="licensetpl_attr_req" 
style="display:none;">true</span></p>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</div>
+<table cellpadding="2" class="toccolours layouttemplate 
commons-file-information-table" style="width: 100%; direction: ltr;">
+<tr>
+<th class="type fileinfo-paramfield">Camera location</th>
+<td style="border:none;"><span class="plainlinksneverexpand"><a 
class="external text" 
href="//tools.wmflabs.org/geohack/geohack.php?pagename=File%3ABust_of_Wilhelmine_of_Bayreuth.jpg&amp;params=49.944191_N_11.577653_E_globe:Earth_type:camera_heading:NE&amp;language=en">49°&#160;56′&#160;39.09″&#160;N,
 11°&#160;34′&#160;39.55″&#160;E</a></span>&#160;&#160;<span title="45°"><img 
alt="45°" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Compass-icon_bb_NE.svg/25px-Compass-icon_bb_NE.svg.png"
 width="25" height="30" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Compass-icon_bb_NE.svg/38px-Compass-icon_bb_NE.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Compass-icon_bb_NE.svg/50px-Compass-icon_bb_NE.svg.png
 2x" data-file-width="1600" data-file-height="1900" /></span></td>
+<td style="border:none;">View this and other nearby images on: <a 
class="external text" 
href="//tools.wmflabs.org/wiwosm/osm-on-ol/commons-on-osm.php?zoom=16&amp;lat=49.944191&amp;lon=11.577653">OpenStreetMap</a>
 - <a rel="nofollow" class="external text" 
href="https://maps.google.com/maps?ll=49.944191,11.577653&amp;spn=0.01,0.01&amp;t=k&amp;q=http://tools.wmflabs.org/geocommons/web.kml&amp;hl=en";>Google
 Maps</a> - <a class="external text" 
href="//tools.wmflabs.org/geocommons/earth.kml?latdegdec=49.944191&amp;londegdec=11.577653&amp;scale=10000&amp;commons=1">Google
 Earth</a></td>
+<td style="border:none;"><a 
href="//commons.wikimedia.org/wiki/Commons:Geocoding" 
title="Commons:Geocoding"><img alt="info" 
src="//upload.wikimedia.org/wikipedia/commons/thumb/1/18/Circle-information.svg/18px-Circle-information.svg.png"
 width="18" height="18" 
srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/18/Circle-information.svg/27px-Circle-information.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/commons/thumb/1/18/Circle-information.svg/36px-Circle-information.svg.png
 2x" data-file-width="225" data-file-height="225" /></a> <span class="geo" 
style="display:none">49.944191; 11.577653</span></td>
+</tr>
+</table>
+
+
+<!-- 
+NewPP limit report
+Parsed by mw1161
+CPU time usage: 0.736 seconds
+Real time usage: 0.836 seconds
+Preprocessor visited node count: 2942/1000000
+Preprocessor generated node count: 25953/1500000
+Post‐expand include size: 57230/2097152 bytes
+Template argument size: 21524/2097152 bytes
+Highest expansion depth: 30/40
+Expensive parser function count: 3/500
+Lua time usage: 0.101/10.000 seconds
+Lua memory usage: 1.03 MB/50 MB
+-->
+
+<!-- 
+Transclusion expansion time report (%,ms,calls,template)
+100.00% 2749.061      1 - -total
+ 23.70%  651.470      1 - Template:Art_Photo
+ 14.57%  400.488      1 - Template:Artwork
+  7.02%  192.873      1 - Template:Photograph
+  3.85%  105.959      1 - Template:Inline_Coordinates
+  3.46%   94.984      1 - Template:Coord/input/dec
+  3.27%   89.924      1 - Template:Coord/link
+  2.72%   74.785      2 - Template:Coord/dec2dms
+  2.49%   68.523      1 - Template:FOP-Germany
+  2.43%   66.805      1 - Template:Occupation
+-->
+
+<!-- Saved in parser cache with key 
commonswiki:pcache:idhash:35237136-1!*!0!!en!4!* and timestamp 20141127005308 
and revision id 134647473
+ -->
diff --git a/tests/html/File_Fourth_Doctor.jpg.html 
b/tests/html/File_Fourth_Doctor.jpg.html
new file mode 100644
index 0000000..86d4e8e
--- /dev/null
+++ b/tests/html/File_Fourth_Doctor.jpg.html
@@ -0,0 +1,156 @@
+<h2><span class="mw-headline" id="Fair_use_rationales">Fair use 
rationales</span><span class="mw-editsection"><span 
class="mw-editsection-bracket">[</span><a 
href="//en.wikipedia.org/w/index.php?title=File:Fourth_Doctor.jpg&amp;action=edit&amp;section=1"
 title="Edit section: Fair use rationales">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
+<table class="toccolours fileinfotpl" style="width: 100%">
+<tr>
+<th colspan="2" style="background: #B7CEFF; text-align: center; 
vertical-align: top; padding-right: 0.4em; width: 15%; font-size: 12pt" 
id="rationale_header">Non-free media data</th>
+</tr>
+<tr>
+<th style="background: #DFEFFF; text-align: right; padding-right: 0.4em; 
width: 15%" id="rationale_desc">Description</th>
+<td>
+<p><span class="fileinfotpl_desc">Tom Baker as the <a 
href="//en.wikipedia.org/wiki/Fourth_Doctor" title="Fourth Doctor">Fourth 
Doctor</a> in Doctor Who.</span></p>
+</td>
+</tr>
+<tr>
+<th style="background: #DFEFFF; text-align: right; padding-right: 0.4em" 
id="rationale_src">Source</th>
+<td>
+<p><span class="fileinfotpl_src"><a rel="nofollow" class="external autonumber" 
href="http://www.shillpages.com/dw/bakert08.jpg";>[1]</a></span></p>
+</td>
+</tr>
+<tr>
+<th style="background: #DFEFFF; text-align: right; padding-right: 0.4em; 
white-space: nowrap" id="rationale_port"><a 
href="//en.wikipedia.org/wiki/Template:Non-free_use_rationale#note-portion" 
title="Template:Non-free use rationale">Portion used</a></th>
+<td>
+<p>Full image; resized.</p>
+</td>
+</tr>
+<tr>
+<th style="background: #DFEFFF; text-align: right; padding-right: 0.4em; 
white-space: nowrap" id="rationale_reduc"><a 
href="//en.wikipedia.org/wiki/Template:Non-free_use_rationale#note-resolution" 
title="Template:Non-free use rationale">Low resolution?</a></th>
+<td>
+<p>Yes</p>
+</td>
+</tr>
+<tr>
+<th style="background: #DFEFFF; text-align: right; padding-right: 0.4em; 
white-space: nowrap" id="rationale_otherinf"><a 
href="//en.wikipedia.org/wiki/Template:Non-free_use_rationale#note-other" 
title="Template:Non-free use rationale">Other information</a></th>
+<td>
+<p>Image Copyright <a href="//en.wikipedia.org/wiki/BBC" 
title="BBC">BBC</a>.</p>
+</td>
+</tr>
+</table>
+<table class="toccolours" style="width: 100%" cellpadding="2">
+<tr>
+<th colspan="2" style="background: pink; text-align: center; vertical-align: 
top; padding-right: 0.4em; width: 15%; font-size: 12pt" 
id="rationale_header">Non-free media <a 
href="//en.wikipedia.org/wiki/Wikipedia:Non-free_use_rationale_guideline" 
title="Wikipedia:Non-free use rationale guideline">rationale</a> for <a 
href="//en.wikipedia.org/wiki/Doctor_(Doctor_Who)" title="Doctor (Doctor 
Who)">Doctor (Doctor Who)</a></th>
+</tr>
+<tr>
+<th style="background: #D8BFD8; text-align: right; padding-right: 0.4em; 
width: 15%" id="rationale_desc">Article</th>
+<td>
+<p><a href="//en.wikipedia.org/wiki/Doctor_(Doctor_Who)" title="Doctor (Doctor 
Who)">Doctor (Doctor Who)</a></p>
+</td>
+</tr>
+<tr>
+<th style="background: #D8BFD8; text-align: right; padding-right: 0.4em; 
white-space: nowrap" id="rationale_purp"><a 
href="//en.wikipedia.org/wiki/Template:Non-free_use_rationale#note-purpose" 
title="Template:Non-free use rationale">Purpose of use</a></th>
+<td>
+<p>As an informational image of the most parodied and popular Doctors, as well 
as an example of how the Doctor changes fashions with each incarnation.</p>
+</td>
+</tr>
+<tr>
+<th style="background: #D8BFD8; text-align: right; padding-right: 0.4em; 
white-space: nowrap" id="rationale_repl"><a 
href="//en.wikipedia.org/wiki/Template:Non-free_use_rationale#note-replace" 
title="Template:Non-free use rationale">Replaceable?</a></th>
+<td>
+<p>None</p>
+</td>
+</tr>
+</table>
+<table class="toccolours" style="width: 100%" cellpadding="2">
+<tr>
+<th colspan="2" style="background: pink; text-align: center; vertical-align: 
top; padding-right: 0.4em; width: 15%; font-size: 12pt" 
id="rationale_header">Non-free media <a 
href="//en.wikipedia.org/wiki/Wikipedia:Non-free_use_rationale_guideline" 
title="Wikipedia:Non-free use rationale guideline">rationale</a> for <a 
href="//en.wikipedia.org/wiki/History_of_Doctor_Who" title="History of Doctor 
Who">History of Doctor Who</a></th>
+</tr>
+<tr>
+<th style="background: #D8BFD8; text-align: right; padding-right: 0.4em; 
width: 15%" id="rationale_desc">Article</th>
+<td>
+<p><a href="//en.wikipedia.org/wiki/History_of_Doctor_Who" title="History of 
Doctor Who">History of Doctor Who</a></p>
+</td>
+</tr>
+<tr>
+<th style="background: #D8BFD8; text-align: right; padding-right: 0.4em; 
white-space: nowrap" id="rationale_purp"><a 
href="//en.wikipedia.org/wiki/Template:Non-free_use_rationale#note-purpose" 
title="Template:Non-free use rationale">Purpose of use</a></th>
+<td>
+<p>To supplement the relevant paragraph's description of the Fourth Doctor 
being a "bohemian wanderer"</p>
+</td>
+</tr>
+<tr>
+<th style="background: #D8BFD8; text-align: right; padding-right: 0.4em; 
white-space: nowrap" id="rationale_repl"><a 
href="//en.wikipedia.org/wiki/Template:Non-free_use_rationale#note-replace" 
title="Template:Non-free use rationale">Replaceable?</a></th>
+<td>
+<p>None</p>
+</td>
+</tr>
+</table>
+<table class="toccolours" style="width: 100%" cellpadding="2">
+<tr>
+<th colspan="2" style="background: pink; text-align: center; vertical-align: 
top; padding-right: 0.4em; width: 15%; font-size: 12pt" 
id="rationale_header">Non-free media <a 
href="//en.wikipedia.org/wiki/Wikipedia:Non-free_use_rationale_guideline" 
title="Wikipedia:Non-free use rationale guideline">rationale</a> for <a 
href="//en.wikipedia.org/wiki/Fourth_Doctor" title="Fourth Doctor">Fourth 
Doctor</a></th>
+</tr>
+<tr>
+<th style="background: #D8BFD8; text-align: right; padding-right: 0.4em; 
width: 15%" id="rationale_desc">Article</th>
+<td>
+<p><a href="//en.wikipedia.org/wiki/Fourth_Doctor" title="Fourth 
Doctor">Fourth Doctor</a></p>
+</td>
+</tr>
+<tr>
+<th style="background: #D8BFD8; text-align: right; padding-right: 0.4em; 
white-space: nowrap" id="rationale_purp"><a 
href="//en.wikipedia.org/wiki/Template:Non-free_use_rationale#note-purpose" 
title="Template:Non-free use rationale">Purpose of use</a></th>
+<td>
+<p>As a visual representation of the Doctor. His appearance is discussed in 
the article.</p>
+</td>
+</tr>
+<tr>
+<th style="background: #D8BFD8; text-align: right; padding-right: 0.4em; 
white-space: nowrap" id="rationale_repl"><a 
href="//en.wikipedia.org/wiki/Template:Non-free_use_rationale#note-replace" 
title="Template:Non-free use rationale">Replaceable?</a></th>
+<td>
+<p>None</p>
+</td>
+</tr>
+</table>
+<h2><span class="mw-headline" id="Licensing">Licensing</span><span 
class="mw-editsection"><span class="mw-editsection-bracket">[</span><a 
href="//en.wikipedia.org/w/index.php?title=File:Fourth_Doctor.jpg&amp;action=edit&amp;section=2"
 title="Edit section: Licensing">edit</a><span 
class="mw-editsection-bracket">]</span></span></h2>
+<table class="plainlinks imbox imbox-license licensetpl" role="presentation">
+<tr>
+<td class="mbox-image"><a 
href="//en.wikipedia.org/wiki/File:NotCommons-emblem-copyrighted.svg" 
class="image" title="Copyrighted"><img alt="Copyrighted" 
src="//upload.wikimedia.org/wikipedia/en/thumb/c/c3/NotCommons-emblem-copyrighted.svg/64px-NotCommons-emblem-copyrighted.svg.png"
 width="64" height="64" 
srcset="//upload.wikimedia.org/wikipedia/en/thumb/c/c3/NotCommons-emblem-copyrighted.svg/96px-NotCommons-emblem-copyrighted.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/en/thumb/c/c3/NotCommons-emblem-copyrighted.svg/128px-NotCommons-emblem-copyrighted.svg.png
 2x" data-file-width="48" data-file-height="48" /></a></td>
+<td class="mbox-text">This is a <a href="//en.wikipedia.org/wiki/Copyright" 
title="Copyright">copyrighted image</a> that has been released by a company or 
organization to promote their work or product in the media, such as advertising 
material or a promotional photo in a press kit.<br />
+<p>The copyright for it is most likely owned by the company who created the 
promotional item or the artist who produced the item in question; you must 
provide evidence of such ownership. Lack of such evidence is grounds for 
deletion.</p>
+<p>It is believed that the use of some images of promotional material to 
illustrate:</p>
+<ul>
+<li>the person(s), product, event, or subject in question;</li>
+<li>where the image is unrepeatable, i.e. a free image could not be created to 
replace it;</li>
+<li>on the <a href="//en.wikipedia.org/wiki/Wikipedia:Main_Page" 
title="Wikipedia:Main Page" class="mw-redirect">English-language Wikipedia</a>, 
hosted on servers in the United States by the non-profit <a 
href="//wikimediafoundation.org/wiki/Home" class="extiw" 
title="wmf:Home">Wikimedia Foundation</a>;</li>
+</ul>
+<p>qualifies as <a href="//en.wikipedia.org/wiki/Fair_use" title="Fair 
use">fair use</a> under <a 
href="//en.wikipedia.org/wiki/United_States_copyright_law" title="United States 
copyright law" class="mw-redirect">United States copyright law</a>. Any other 
usage of this image, on Wikipedia or elsewhere, might be <a 
href="//en.wikipedia.org/wiki/Copyright_infringement" title="Copyright 
infringement">copyright infringement</a>. See <a 
href="//en.wikipedia.org/wiki/Wikipedia:Non-free_content" 
title="Wikipedia:Non-free content">Wikipedia:Non-free content</a> and <a 
href="//en.wikipedia.org/wiki/Wikipedia:Publicity_photos" 
title="Wikipedia:Publicity photos">Wikipedia:Publicity photos</a>.</p>
+<p>Additionally, the copyright holder may have granted permission for use in 
works such as Wikipedia. However, if they have, this permission likely does not 
fall under a free license.<br /></p>
+<div class="floatleft"><img alt="" 
src="//upload.wikimedia.org/wikipedia/en/thumb/1/15/Ambox_warning_pn.svg/30px-Ambox_warning_pn.svg.png"
 width="30" height="26" 
srcset="//upload.wikimedia.org/wikipedia/en/thumb/1/15/Ambox_warning_pn.svg/45px-Ambox_warning_pn.svg.png
 1.5x, 
//upload.wikimedia.org/wikipedia/en/thumb/1/15/Ambox_warning_pn.svg/60px-Ambox_warning_pn.svg.png
 2x" data-file-width="378" data-file-height="326" /></div>
+Please note that <a href="//en.wikipedia.org/wiki/Wikipedia:NFC#UULP" 
title="Wikipedia:NFC" class="mw-redirect">our policy</a> usually considers fair 
use images of living people that merely show what they look like to be 
replaceable by <a href="//en.wikipedia.org/wiki/Free_content" title="Free 
content">free-licensed</a> images and unsuitable for the project. If this is 
not the case for this image, a rationale must be provided proving that the 
image provides information beyond simple identification or showing that this 
image is difficult to replace by a free-licensed equivalent. Commercial 
third-party reusers of this image should consider whether their use is in 
violation of the subject's <a href="//en.wikipedia.org/wiki/Personality_rights" 
title="Personality rights">publicity rights</a>.</td>
+</tr>
+</table>
+
+
+<!-- 
+NewPP limit report
+Parsed by mw1242
+CPU time usage: 0.129 seconds
+Real time usage: 0.230 seconds
+Preprocessor visited node count: 340/1000000
+Preprocessor generated node count: 0/1500000
+Post‐expand include size: 15137/2097152 bytes
+Template argument size: 1405/2097152 bytes
+Highest expansion depth: 8/40
+Expensive parser function count: 3/500
+Lua time usage: 0.014/10.000 seconds
+Lua memory usage: 785 KB/50 MB
+-->
+
+<!-- 
+Transclusion expansion time report (%,ms,calls,template)
+100.00%  149.703      1 - -total
+ 34.45%   51.574      1 - Template:Non-free_promotional
+ 31.17%   46.656      1 - Template:Imbox
+ 10.48%   15.687      3 - Template:Non-free_image_rationale
+  9.49%   14.208      1 - Template:Category_handler
+  4.09%    6.124      1 - Template:Non-free_image_data
+  3.50%    5.241      4 - Template:Non-free_media
+  3.42%    5.118      1 - Template:DrWho_image
+  2.01%    3.005      4 - Template:File_other
+  1.40%    2.091      1 - Template:Image_other
+-->
+
+<!-- Saved in parser cache with key enwiki:pcache:idhash:338385-1!*!0!!*!4!* 
and timestamp 20141126224633 and revision id 605477868
+ -->
diff --git a/tests/phpunit/DataCollectorTest.php 
b/tests/phpunit/DataCollectorTest.php
index 4160099..f8b2adb 100644
--- a/tests/phpunit/DataCollectorTest.php
+++ b/tests/phpunit/DataCollectorTest.php
@@ -144,6 +144,24 @@
                $this->assertMetadataValue( 'License', 'quux.name', 
$templateData );
        }
 
+       public function testGetTemplateMetadataForMultipleInfoTemplates() {
+               $getTemplateMetadataMethod = new ReflectionMethod( 
$this->dataCollector, 'getTemplateMetadata' );
+               $getTemplateMetadataMethod->setAccessible( true );
+
+               $template1 = array( 'Artist' => 'a1', 'Foo' => 'x' );
+               $template2 = array( 'Artist' => 'a2', 'Bar' => 'y' );
+               $templateData = $getTemplateMetadataMethod->invokeArgs( 
$this->dataCollector, array( array(
+                       TemplateParser::COORDINATES_KEY => array(),
+                       TemplateParser::INFORMATION_FIELDS_KEY => array( 
$template1, $template2 ),
+                       TemplateParser::LICENSES_KEY => array(),
+               ) ) );
+
+               $this->assertMetadataValue( 'Artist', 'a1', $templateData );
+               $this->assertMetadataValue( 'Foo', 'x', $templateData );
+               $this->assertArrayNotHasKey( 'Bar', $templateData );
+               $this->assertMetadataValue( 'AuthorCount', 2, $templateData );
+       }
+
        /*------------------------------- Helpers --------------------------*/
 
        protected function assertMetadataValue( $field, $expected, $metadata, 
$message = '' ) {
diff --git a/tests/phpunit/DomNavigatorTest.php 
b/tests/phpunit/DomNavigatorTest.php
index 3def50d..187f544 100644
--- a/tests/phpunit/DomNavigatorTest.php
+++ b/tests/phpunit/DomNavigatorTest.php
@@ -26,6 +26,16 @@
                $this->assertTrue( $navigator->hasClass( $node, 'foo baz' ) );
        }
 
+       public function testGetFirstClassWithPrefix() {
+               $navigator = new DomNavigator( '<span class="foo bar baz 
boom"></span>' );
+               $node = $navigator->getByXpath( '//body/*' );
+               $this->assertEquals( 'bar', 
$navigator->getFirstClassWithPrefix( $node, 'ba' ) );
+               $this->assertEquals( 'foo', 
$navigator->getFirstClassWithPrefix( $node, 'fo' ) );
+               $this->assertEquals( 'boom', 
$navigator->getFirstClassWithPrefix( $node, 'boom' ) );
+               $this->assertNull( $navigator->getFirstClassWithPrefix( $node, 
'zzap' ) );
+               $this->assertNull( $navigator->getFirstClassWithPrefix( $node, 
'ar' ) );
+       }
+
        public function testFindElementsWithClass() {
                // one result
                $navigator = new DomNavigator( '<div><span>1</span><span 
class="foo">2</span><span>3</span></div>' );
@@ -50,6 +60,23 @@
                $navigator = new DomNavigator( '<div><span x="1"></span><span 
class="foo" x="2"><span class="foo" x="3"></span></span></div>' );
                $nodes = $navigator->findElementsWithClass( 'span', 'foo' );
                $this->assertNodeListAttributeEquals( 'x', array( '2', '3' ), 
$nodes );
+       }
+
+       public function testFindElementsWithClassPrefix() {
+               // one class
+               $navigator = new DomNavigator( '<div><span 
class="foo">1</span><span class="foobar">2</span><span 
class="barfoo">3</span></div>' );
+               $nodes = $navigator->findElementsWithClassPrefix( 'span', 'foo' 
);
+               $this->assertNodeListTextEquals( array( '1', '2' ), $nodes );
+
+               // more classes
+               $navigator = new DomNavigator( '<div><span class="baz foobar 
boom">1</span><span class="foobar baz">2</span><span class="baz 
foobar">3</span></div>' );
+               $nodes = $navigator->findElementsWithClassPrefix( 'span', 'foo' 
);
+               $this->assertNodeListTextEquals( array( '1', '2', '3' ), $nodes 
);
+
+               // more classes - negative
+               $navigator = new DomNavigator( '<div><span class="baz barfoo 
boom">1</span><span class="fo obar baz">2</span><span class="baz fo 
bar">3</span></div>' );
+               $nodes = $navigator->findElementsWithClassPrefix( 'span', 'foo' 
);
+               $this->assertNodeListTextEquals( array(), $nodes );
        }
 
        public function testTagNameSelector() {
@@ -133,7 +160,7 @@
                $this->assertNull( $closest );
        }
 
-       public function nextSiblingTest() {
+       public function testNextSibling() {
                $navigator = new DomNavigator( '<div><span>1</span><span 
id="foo">2</span><span>3</span><span>4</span></div>' );
                $node = $navigator->getByXpath( "//*[@id = 'foo']" );
                $nextSibling = $navigator->nextElementSibling( $node );
diff --git a/tests/phpunit/ParserTestHelper.php 
b/tests/phpunit/ParserTestHelper.php
index ec7e51d..d90a292 100644
--- a/tests/phpunit/ParserTestHelper.php
+++ b/tests/phpunit/ParserTestHelper.php
@@ -38,6 +38,10 @@
                'title' => 'File_Askaris_im_Warschauer_Getto_-_1943.jpg',
                // Book + Photograph templates
                'book' => 'File_Askaris_im_Warschauer_Getto_-_1943.jpg',
+               // new format for {{Information}} fields
+               'infotpl_class' => 'File_Fourth_Doctor.jpg',
+               // {{Artwork}} + {{Photograph}}
+               'multiple_infotpl' => 'File_Bust_of_Wilhelmine_of_Bayreuth.jpg',
        );
 
        /**
diff --git a/tests/phpunit/TemplateParserTest.php 
b/tests/phpunit/TemplateParserTest.php
index b14e0ae..399871b 100644
--- a/tests/phpunit/TemplateParserTest.php
+++ b/tests/phpunit/TemplateParserTest.php
@@ -190,6 +190,26 @@
                        . '<i>Askaris used during the 
operation</i></span></span>', $data, TemplateParser::INFORMATION_FIELDS_KEY );
        }
 
+       /**
+        * The old {{Information}} template format used ids on the preceding 
table cells, the new one
+        * uses classes without any furter restriction.
+        */
+       public function testClassBasedInfotemplate() {
+               $data = $this->parseTestHTML( 'infotpl_class' );
+               $this->assertFieldEquals( 'ImageDescription',
+                       'Tom Baker as the <a 
href="//en.wikipedia.org/wiki/Fourth_Doctor" title="Fourth Doctor">Fourth 
Doctor</a> in Doctor Who.',
+                       $data, TemplateParser::INFORMATION_FIELDS_KEY );
+       }
+
+       /**
+        * Combination of multiple information templates, e.g. {{Artwork}} + 
{{Photograph}}
+        */
+       public function testMultipleInfoTemplates() {
+               $data = $this->parseTestHTML( 'multiple_infotpl' );
+               $this->assertFieldEquals( 'Artist',
+                       '<span class="fn value"><a 
href="//commons.wikimedia.org/wiki/User:El_Grafo" title="User:El Grafo">El 
Grafo</a></span>',
+                       $data, TemplateParser::INFORMATION_FIELDS_KEY );
+       }
 
        // -------------------- license tests --------------------
 

-- 
To view, visit https://gerrit.wikimedia.org/r/176215
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I011c195fb4b32560e70cb36d2a9a780ef3f6a4ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CommonsMetadata
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to