Examples of HTMLHeadElement


Examples of org.w3c.dom.html.HTMLHeadElement

                    "HTML response must have exactly one HEAD element, "
                            + "found " + heads.getLength() + " : "
                            + heads.toString(),
                    OpenIDException.YADIS_HTMLMETA_INVALID_RESPONSE);

        HTMLHeadElement head = (HTMLHeadElement) doc.getHead();
        NodeList metaElements = head.getElementsByTagName("META");
        if (metaElements == null || metaElements.getLength() == 0)
        {
            if (DEBUG)
                _log.debug("No <meta> element found under <html><head>. " +
                "See Yadis specification, section 6.2.5/1.");
        }
        else
        {
            for (int i = 0, len = metaElements.getLength(); i < len; i++)
            {
                HTMLMetaElement metaElement = (HTMLMetaElement) metaElements.item(i);

                String httpEquiv = metaElement.getHttpEquiv();
                if (YadisResolver.YADIS_XRDS_LOCATION.equalsIgnoreCase(httpEquiv))
                {
                    if (xrdsLocation != null)
                        throw new YadisException(
                            "More than one "
                                + YadisResolver.YADIS_XRDS_LOCATION
                                + "META tags found in HEAD: "
                                + head.toString(),
                            OpenIDException.YADIS_HTMLMETA_INVALID_RESPONSE);

                    xrdsLocation = metaElement.getContent();
                    if (DEBUG)
                        _log.debug("Found " + YadisResolver.YADIS_XRDS_LOCATION
View Full Code Here

Examples of org.w3c.dom.html.HTMLHeadElement

        ItsNatServlet servlet = itsNatDoc.getItsNatDocumentTemplate().getItsNatServlet();
        ItsNatHTMLDocFragmentTemplate docFragTemplate =
                (ItsNatHTMLDocFragmentTemplate)servlet.getItsNatDocFragmentTemplate("feashow.core.otherns.svgInHTMLMime.ex");
        DocumentFragment headFrag = docFragTemplate.loadDocumentFragmentHead(itsNatDoc);
        this.styleElem = (HTMLStyleElement)ItsNatTreeWalker.getFirstChildElement(headFrag);
        HTMLHeadElement headElem =
                (HTMLHeadElement)ItsNatTreeWalker.getFirstChildElement(doc.getDocumentElement());
        headElem.appendChild(styleElem);

        Element listParentElem = doc.getElementById("circleListId");
        ElementGroupManager factory = itsNatDoc.getElementGroupManager();
        this.circleList = factory.createElementList(listParentElem,true);
View Full Code Here

Examples of org.w3c.dom.html.HTMLHeadElement

    {
        super(docTemplate,source,timeStamp,request,response);

        HTMLDocument templateHtmlDoc = (HTMLDocument)getDocument();

        HTMLHeadElement head = DOMUtilHTML.getHTMLHead(templateHtmlDoc);
        HTMLBodyElement body = (HTMLBodyElement)templateHtmlDoc.getBody();

        // Tenemos la seguridad de que hay <head> y <body> pues el parser normaliza siempre el HTML incluy�ndolos
        // y el <html> NO se cachea.
        // Hay que recordar que tras el crear el DocumentFragment el <head> y el <body> quedan vac�os.
View Full Code Here

Examples of org.w3c.dom.html.HTMLHeadElement

            /* Este chequeo es muy conveniente porque el parser de FireFox (v2 al menos)
             * y Safari (v3) autom�ticamente mueve un elemento <style> bajo <body> a <head>
             * (el �ltimo) lo cual perturba el layout esperado.
             * Por ello lo hacemos nosotros antes.
             */
            HTMLHeadElement head = DOMUtilHTML.getHTMLHead(doc);
            for(Iterator<Node> it = styles.iterator(); it.hasNext(); )
            {
                HTMLStyleElement style = (HTMLStyleElement)it.next();
                if (style.getParentNode() != head)
                    head.appendChild(style);
            }
        }
    }
View Full Code Here

Examples of org.w3c.dom.html.HTMLHeadElement

        Node parent = elem.getParentNode();
        if (parent == null) return false;
        Document doc = elem.getOwnerDocument();
        if (!(doc instanceof HTMLDocument)) return false; // No es ni siquiera un documento HTML
        HTMLDocument htmDoc = (HTMLDocument)doc;
        HTMLHeadElement head = getHTMLHead(htmDoc);
        while(parent != null)
        {
            if (parent == head)
                return true;
View Full Code Here

Examples of org.w3c.dom.html.HTMLHeadElement

        return DOMUtilHTML.getHTMLHead(this);
    }

    public HTMLTitleElement getTitleElement()
    {
        HTMLHeadElement head = (HTMLHeadElement)getHead();
        if (head == null) return null;
        Node title = head.getFirstChild();
        while ( (title != null) && !(title instanceof HTMLTitleElement) )
            title = title.getNextSibling();
        return (HTMLTitleElement)title; // Puede ser nulo
    }
View Full Code Here

Examples of org.w3c.dom.html.HTMLHeadElement

        // Tenemos la garant�a de que no hay comentarios en lugares donde
        // no puede ponerse un <style> bajo <head> y <span> bajo BODY pues fueron filtrados en la normalizaci�n.
        // El S60WebKit (FP 1) mueve los <style> bajo <body> a <head>
        // Sabemos que en este contexto los mutation events est�n desactivados

        HTMLHeadElement head = DOMUtilHTML.getHTMLHead(doc);
        replaceComments(head,"style");
        HTMLElement body = doc.getBody();
        replaceComments(body,"span");

        return !comments.isEmpty(); // Si false es que no hay ningun comentario, no se ha hecho nada
View Full Code Here

Examples of org.w3c.dom.html.HTMLHeadElement

                    if (attrNamespaces == null) attrNamespaces = new HashMap<String,Attr>();
                    attrNamespaces.put(attr.getName(),attr);
                }
            }
        }
        HTMLHeadElement head = DOMUtilHTML.getHTMLHead(doc);
        processTreeNamespaces(head); // head puede ser null
        HTMLBodyElement body = (HTMLBodyElement)doc.getBody();
        processTreeNamespaces(body);
        return attrNamespaces;
    }
View Full Code Here

Examples of org.w3c.dom.html.HTMLHeadElement

        }

        if (!svgWeb)
        {
            // No est� svg.render.forceflash en el URL vamos a ver si est� en el <meta>
            HTMLHeadElement head = DOMUtilHTML.getHTMLHead(doc);
            LinkedList<Node> metaList = DOMUtilInternal.getChildElementListWithTagName(head,"meta",true);
            if (metaList != null)
            {
                int i = 0;
                for(Iterator<Node> it = metaList.iterator(); it.hasNext(); )
View Full Code Here

Examples of org.w3c.dom.html.HTMLHeadElement

                    "HTML response must have exactly one HEAD element, "
                            + "found " + heads.getLength() + " : "
                            + heads.toString(),
                    OpenIDException.YADIS_HTMLMETA_INVALID_RESPONSE);

        HTMLHeadElement head = (HTMLHeadElement) doc.getHead();
        NodeList metaElements = head.getElementsByTagName("META");
        if (metaElements == null || metaElements.getLength() == 0)
        {
            if (DEBUG)
                _log.debug("No <meta> element found under <html><head>. " +
                "See Yadis specification, section 6.2.5/1.");
        }
        else
        {
            for (int i = 0, len = metaElements.getLength(); i < len; i++)
            {
                HTMLMetaElement metaElement = (HTMLMetaElement) metaElements.item(i);

                String httpEquiv = metaElement.getHttpEquiv();
                if (YadisResolver.YADIS_XRDS_LOCATION.equalsIgnoreCase(httpEquiv))
                {
                    if (xrdsLocation != null)
                        throw new YadisException(
                            "More than one "
                                + YadisResolver.YADIS_XRDS_LOCATION
                                + "META tags found in HEAD: "
                                + head.toString(),
                            OpenIDException.YADIS_HTMLMETA_INVALID_RESPONSE);

                    xrdsLocation = metaElement.getContent();
                    if (DEBUG)
                        _log.debug("Found " + YadisResolver.YADIS_XRDS_LOCATION
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.