private void validateUpdateURL(Element parent) { NodeList list = getChildrenByName(parent, "update"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element update = (Element)list.item(0); assertAttributeDefined(update, "url", CompilerFlags.ERROR); //$NON-NLS-1$ NamedNodeMap attributes = update.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { String name = attributes.item(i).getNodeName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(update, "url"); //$NON-NLS-1$ } else if (!name.equals("label")) { //$NON-NLS-1$ reportUnknownAttribute(update, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateDescription(Element parent) { NodeList list = getChildrenByName(parent, "description"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element)list.item(0); validateElementWithContent((Element)list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr)attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateCopyright(Element parent) { NodeList list = getChildrenByName(parent, "copyright"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element) list.item(0); validateElementWithContent((Element) list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr) attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateUpdateURL(Element parent) { NodeList list = getChildrenByName(parent, "update"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element update = (Element) list.item(0); assertAttributeDefined(update, "url", CompilerFlags.ERROR); //$NON-NLS-1$ NamedNodeMap attributes = update.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { String name = attributes.item(i).getNodeName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(update, "url"); //$NON-NLS-1$ } else if (!name.equals("label")) { //$NON-NLS-1$ reportUnknownAttribute(update, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
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 validateLicense(Element parent) { NodeList list = getChildrenByName(parent, "license"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element)list.item(0); validateElementWithContent((Element)list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr)attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateCopyright(Element parent) { NodeList list = getChildrenByName(parent, "copyright"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element)list.item(0); validateElementWithContent((Element)list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr)attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateLicense(Element parent) { NodeList list = getChildrenByName(parent, "license"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element) list.item(0); validateElementWithContent((Element) list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr) attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
private void validateDescription(Element parent) { NodeList list = getChildrenByName(parent, "description"); //$NON-NLS-1$ if (list.getLength() > 0) { if (fMonitor.isCanceled()) return; Element element = (Element) list.item(0); validateElementWithContent((Element) list.item(0), true); NamedNodeMap attributes = element.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { Attr attr = (Attr) attributes.item(i); String name = attr.getName(); if (name.equals("url")) { //$NON-NLS-1$ validateURL(element, name); } else { reportUnknownAttribute(element, name, CompilerFlags.ERROR); } } reportExtraneousElements(list, 1); } }
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); } } } }