PHP XSLTProcessor

Code
<?php

$xslStr 
'<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <body>
  <h1>List of cities</h1>
  <ul>
    <xsl:for-each select="List/City">
    <li>city</li>
    <ul>
      <li><xsl:value-of select="CityId"/></li>
      <li><xsl:value-of select="Name"/></li>
    </ul>
    </xsl:for-each>
  </ul>
  </body>
  </html>
</xsl:template>

<xsl:output method="html" version="5.0" doctype-system="about:legacy-compat" />

</xsl:stylesheet>'
;

$xsl = new DOMDocument();
$xsl->loadXML($xslStr);

$xml = new DOMDocument();
$xml->load(__DIR__ '/city.xml');

$p = new XSLTProcessor();
$p->importStylesheet($xsl);

$xml $p->transformToXML($xml);

echo 
$xml;
Result
<!DOCTYPE html SYSTEM "about:legacy-compat">
<html><body>
<h1>List of cities</h1>
<ul>
<li>city</li>
<ul>
<li>1</li>
<li>South Park</li>
</ul>
<li>city</li>
<ul>
<li>2</li>
<li>Springfield</li>
</ul>
<li>city</li>
<ul>
<li>3</li>
<li>Quahog</li>
</ul>
</ul>
</body></html>
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6