isLocalElement example

$this->wr(static::DOCTYPE);
        $this->nl();
    }

    public function element($ele)
    {
        $name = $ele->tagName;

        // Per spec:         // If the element has a declared namespace in the HTML, MathML or         // SVG namespaces, we use the lname instead of the tagName.         if ($this->traverser->isLocalElement($ele)) {
            $name = $ele->localName;
        }

        // If we are in SVG or MathML there is special handling.         // Using if/elseif instead of switch because it's faster in PHP.         if ('svg' == $name) {
            $this->outputMode = static::IM_IN_SVG;
            $name = Elements::normalizeSvgElement($name);
        } elseif ('math' == $name) {
            $this->outputMode = static::IM_IN_MATHML;
        }

        
Home | Imprint | This part of the site doesn't use cookies.