Esempio n. 1
0
 /**
  * Looks for special OPT attributes in the element attribute list and
  * processes them. Returns the list of nodes that need to be postprocessed.
  *
  * @internal
  * @param Opt_Compiler_Class $compiler The compiler.
  * @param Boolean $specialNs Do we recognize special namespaces?
  */
 protected function _processXml(Opt_Compiler_Class $compiler, $specialNs = true)
 {
     if (!$this->hasAttributes()) {
         return array();
     }
     $attributes = $this->getAttributes();
     $this->_postprocess = array();
     $opt = Opl_Registry::get('opt');
     // Look for special OPT attributes
     foreach ($attributes as $attr) {
         if ($compiler->isNamespace($attr->getNamespace())) {
             $xml = $attr->getXmlName();
             if (($processor = $compiler->isOptAttribute($xml)) !== null) {
                 $processor->processAttribute($this, $attr);
                 if ($attr->get('postprocess')) {
                     $this->_postprocess[] = array($processor, $attr);
                 }
             }
             $this->removeAttribute($xml);
         } else {
             $compiler->compileAttribute($attr);
         }
     }
 }