Package nu.validator.xml

Examples of nu.validator.xml.AttributesImpl.addAttribute()


        String wrapper = (bad? "b" : "span");
        String highlight = (bad? " highlight" : "");
        if (typeCount > 1 || "value".equals(attributeName)) {
            addText(xhtmlSaxEmitter, " ");
            AttributesImpl attributesImpl = new AttributesImpl();
            attributesImpl.addAttribute("class", "inputattrtypes" + highlight);
            xhtmlSaxEmitter.startElement(wrapper, attributesImpl);
            addText(xhtmlSaxEmitter, "when ");
            xhtmlSaxEmitter.startElement("code");
            addText(xhtmlSaxEmitter, "type");
            xhtmlSaxEmitter.endElement("code", "code");
View Full Code Here


                }
            }
            xhtmlSaxEmitter.endElement(wrapper);
        } else {
            AttributesImpl attributesImpl = new AttributesImpl();
            attributesImpl.addAttribute("class", "inputattrtypes");
            xhtmlSaxEmitter.startElement("span", attributesImpl);
            xhtmlSaxEmitter.endElement("span");
        }
    }
View Full Code Here

    }

    private void addHyperlink(XhtmlSaxEmitter xhtmlSaxEmitter, String text,
            String href) throws SAXException {
        AttributesImpl attributesImpl = new AttributesImpl();
        attributesImpl.addAttribute("href", href);
        xhtmlSaxEmitter.startElement("a", attributesImpl);
        addText(xhtmlSaxEmitter, text);
        xhtmlSaxEmitter.endElement("a");
    }
View Full Code Here

            case IN_PROSE:
                String href = null;
                if (NS == uri && "a" == localName) {
                    if ((href = atts.getValue("", "href")) != null) {
                        AttributesImpl ai = new AttributesImpl();
                        ai.addAttribute("href", href);
                        depth++;
                        treeBuilder.startElement(uri, localName, qName, ai);
                    }
                } else if (depth == 0 && NS == uri && "div" == localName
                        && ("printfooter".equals(atts.getValue("", "class")))) {
View Full Code Here

                            && (href = atts.getValue("", "href")) != null) {
                        if (href.startsWith("#")) {
                            href = SPEC_LINK_URI + href;
                        }
                        AttributesImpl attributesImpl = new AttributesImpl();
                        attributesImpl.addAttribute("href", href);
                        fragmentBuilder.startElement(uri, localName, qName,
                                attributesImpl);
                    } else if (state == State.CAPTURING_ATTRIBUTES_DDS
                            && "input".equals(currentName.getLocalName())
                            && "code".equals(localName)
View Full Code Here

                    } else if (state == State.CAPTURING_ATTRIBUTES_DDS
                            && "input".equals(currentName.getLocalName())
                            && "code".equals(localName)
                            ) {
                        AttributesImpl attributesImpl = new AttributesImpl();
                        attributesImpl.addAttribute("class", "inputattrname");
                        fragmentBuilder.startElement(uri, localName, qName,
                                attributesImpl);
                    } else {
                        fragmentBuilder.startElement(uri, localName, qName,
                                EmptyAttributes.EMPTY_ATTRIBUTES);
View Full Code Here

            TreeBuilder fragmentBuilder) throws SAXException {
        if (validInputTypesByAttributeName.containsKey(attributeName)
                || "value".equals(attributeName)) {
            addText(" ");
            AttributesImpl attributesImpl = new AttributesImpl();
            attributesImpl.addAttribute("class", "inputattrtypes " + attributeName);
            fragmentBuilder.startElement(NS, "span", "span", attributesImpl);
            addText("when ");
            fragmentBuilder.startElement(NS, "code", "code", EmptyAttributes.EMPTY_ATTRIBUTES);
            addText("type");
            fragmentBuilder.endElement(NS, "code", "code");
View Full Code Here

                }
            }
            fragmentBuilder.endElement(NS, "span", "span");
        } else {
            AttributesImpl attributesImpl = new AttributesImpl();
            attributesImpl.addAttribute("class", "inputattrtypes");
            fragmentBuilder.startElement(NS, "span", "span", attributesImpl);
            fragmentBuilder.endElement(NS, "span", "span");
        }
    }
View Full Code Here

        fragmentBuilder.characters(ch, 0, ch.length);
    }

    private void addHyperlink(String text, String href) throws SAXException {
        AttributesImpl attributesImpl = new AttributesImpl();
        attributesImpl.addAttribute("href", href);
        fragmentBuilder.startElement(NS, "a", "a", attributesImpl);
        addText(text);
        fragmentBuilder.endElement(NS, "a", "a");
    }
View Full Code Here

                langValue = attributes.getValue(i);
            } else if (local == "xml:lang" && uri == "") {
                String xmlLangValue = attributes.getValue(i);
                AttributesImpl attributesImpl = new AttributesImpl();
                for (int j = 0; j < i; j++) {
                    attributesImpl.addAttribute(attributes.getURI(j), attributes.getLocalName(j), attributes.getQName(j), attributes.getType(j), attributes.getValue(j));
                }
                for (int k = i + 1; k < len; k++) {
                    uri = attributes.getURI(k);
                    local = attributes.getLocalName(k);
                    if (local == "lang" && uri == "http://www.w3.org/XML/1998/namespace") {
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.