Example #1
0
 protected function lookupNamespace($sPrefix, dom\element $context = null)
 {
     $sNamespace = '';
     if ($context) {
         if (!($sNamespace = $context->lookupNamespace($sPrefix))) {
             $sNamespace = $context->getHandler()->getRoot()->lookupNamespace($sPrefix);
         }
     }
     if (!$sNamespace) {
         $sNamespace = $this->getDocument()->getRoot()->lookupNamespace($sPrefix);
     }
     return $sNamespace ? $sNamespace : $this->getNamespace($sPrefix);
 }
Example #2
0
 public function parseAttributes(dom\element $el, $resultElement, $current)
 {
     $aResult = null;
     $bRoot = false;
     //$el = $this->setNode($el);
     $aResult[] = $this->init();
     $el->getHandler()->registerNamespaces($this->getNS());
     if ($this->elementIsTemplate($el)) {
         $aResult[] = $this->reflectTemplate($el, $resultElement);
     } else {
         if ($this->elementIsObject($el)) {
             if (!$this->bRoot) {
                 $this->bRoot = true;
                 $aResult[] = $this->getPHPWindow()->createInstruction($this->getContainer());
             }
             $aResult[] = $this->reflectObject($el, $resultElement);
         } else {
             if ($this->elementIsNode($el)) {
                 $aResult[] = $this->reflectNode($el, $resultElement);
             }
         }
     }
     return $aResult;
 }
Example #3
0
 protected function registerNamespaces(dom\element $el)
 {
     $el->getHandler()->registerNamespaces($this->getNS());
 }