private void validateDiscoveryURL(Element parent) { NodeList list = getChildrenByName(parent, "discovery"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element discovery = (Element)list.item(0); assertAttributeDefined(discovery, "url", CompilerFlags.ERROR); //$NON-NLS-1$ NamedNodeMap attributes = discovery.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { String name = attributes.item(i).getNodeName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(discovery, "url"); //$NON-NLS-1$ } else if (name.equals("type")) { //$NON-NLS-1$ String value = discovery.getAttribute("type"); //$NON-NLS-1$ if (!value.equals("web") && !value.equals("update")) { //$NON-NLS-1$ //$NON-NLS-2$ reportIllegalAttributeValue(discovery, (Attr)attributes.item(i)); } reportDeprecatedAttribute(discovery, discovery.getAttributeNode("type")); //$NON-NLS-1$ } else if (!name.equals("label")) { //$NON-NLS-1$ reportUnknownAttribute(discovery, name, CompilerFlags.ERROR); } } } }
private void validateDiscoveryURL(Element parent) { NodeList list = getChildrenByName(parent, "discovery"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element discovery = (Element) list.item(0); assertAttributeDefined(discovery, "url", CompilerFlags.ERROR); //$NON-NLS-1$ NamedNodeMap attributes = discovery.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { String name = attributes.item(i).getNodeName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(discovery, "url"); //$NON-NLS-1$ } else if (name.equals("type")) { //$NON-NLS-1$ String value = discovery.getAttribute("type"); //$NON-NLS-1$ if (!value.equals("web") && !value.equals("update")) { //$NON-NLS-1$ //$NON-NLS-2$ reportIllegalAttributeValue(discovery, (Attr) attributes.item(i)); } reportDeprecatedAttribute(discovery, discovery.getAttributeNode("type")); //$NON-NLS-1$ } else if (!name.equals("label")) { //$NON-NLS-1$ reportUnknownAttribute(discovery, name, CompilerFlags.ERROR); } } } }
String value = include.getAttribute("search-location"); //$NON-NLS-1$ if (!value.equals("root") && !value.equals("self") && !value.equals("both")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ reportIllegalAttributeValue(include, attr);
String value = include.getAttribute("search-location"); //$NON-NLS-1$ if (!value.equals("root") && !value.equals("self") && !value.equals("both")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ reportIllegalAttributeValue(include, attr);