Exemple #1
0
 /**
  * @param DOMDocument $document
  */
 public function transpile(DOMDocument $document)
 {
     $root = $document->documentElement;
     if ($root === null) {
         return;
     }
     $transformers = $this->context->getTransformers();
     foreach ($transformers as $transformer) {
         $transformer->transform($document);
     }
     if ($root && $root->getAttribute('version') === '2.0') {
         $root->setAttribute('version', '1.0');
     }
 }