private Name makeName(String uri, String localName) { if (!uri.equals("")) usedNamespaceUris.add(uri); return new Name(uri, localName); }
public void startElement(String namespaceUri, String localName, String qName, Attributes attributes) throws SAXException { Name elementName = new Name(namespaceUri, localName); int len = attributes.getLength(); for (int i = 0; i < len; i++) { Name attributeName = new Name(attributes.getURI(i), attributes.getLocalName(i)); String value = attributes.getValue(i); checker.attribute(elementName, attributeName, value, locator); } }
public void startElement(String namespaceUri, String localName, String qName, Attributes attributes) throws SAXException { Name elementName = new Name(namespaceUri, localName); int len = attributes.getLength(); for (int i = 0; i < len; i++) { Name attributeName = new Name(attributes.getURI(i), attributes.getLocalName(i)); String value = attributes.getValue(i); checker.attribute(elementName, attributeName, value, locator); } }
public void visitAnyName() { probe(new Name(IMPOSSIBLE, IMPOSSIBLE)); }
public NameClass makeName(String ns, String localName, String prefix, Locator loc, AnnotationsImpl anno) { return new SimpleNameClass(new Name(resolveInherit(ns), localName)); }
public VnuBadElementNameException(String elementName, String uri, String message, Locator locator, Class<?> datatypeClass, boolean warning) throws SAXException, ClassNotFoundException { super("Bad element name \u201c" + elementName + "\u201d: " + message, locator); Html5DatatypeException ex5 = new Html5DatatypeException(0, datatypeClass, "element name", message, warning); this.element = new Name(uri, elementName); this.exceptions = new HashMap<>(); this.exceptions.put("", ex5); }
public void visitAnyName() { probe(new Name(IMPOSSIBLE, IMPOSSIBLE)); }
public void endElement(String namespaceURI, String localName, String qName) throws SAXException { if (bufferingCharacters) { bufferingCharacters = false; if (charBuf.length() > 0) check(matcher.matchTextBeforeEndTag(charBuf.toString(), new Name(namespaceURI, localName), qName, this)); } check(matcher.matchEndTag(new Name(namespaceURI, localName), qName, this)); }
public void endElement(String namespaceURI, String localName, String qName) throws SAXException { if (bufferingCharacters) { bufferingCharacters = false; if (charBuf.length() > 0) check(matcher.matchTextBeforeEndTag(charBuf.toString(), new Name(namespaceURI, localName), qName, this)); } check(matcher.matchEndTag(new Name(namespaceURI, localName), qName, this)); }
private void parseElement(Attributes attributes) throws SAXException { String ns = getNs(attributes, false); if (ns != null) elementNs = ns; if (!currentElementAction.covered.contains(elementNs)) error("context_ns_not_covered", elementNs); nameStack.push(new Name(elementNs, attributes.getValue("", "name").trim())); pathDepth++; }
private void parseElement(Attributes attributes) throws SAXException { String ns = getNs(attributes, false); if (ns != null) elementNs = ns; if (!currentElementAction.covered.contains(elementNs)) error("context_ns_not_covered", elementNs); nameStack.push(new Name(elementNs, attributes.getValue("", "name").trim())); pathDepth++; }
public Set<Name> visitAttribute(AttributePattern p) { Set<Name> result = new HashSet<Name>(); List<NameNameClass> names = NameClassSplitter.split(p.getNameClass()); for (int i = 0, len = names.size(); i < len; i++) { NameNameClass nnc = names.get(i); String ns = nnc.getNamespaceUri(); if (ns == NameClass.INHERIT_NS) ns = ""; result.add(new Name(ns, nnc.getLocalName())); } return result; }
public VoidValue visitName(NameNameClass nc) { if (inExcept) { String ns = resolve(nc.getNamespaceUri()); if (inNs == null || inNs.equals(ns)) excludedNames.add(new Name(ns, nc.getLocalName())); } return VoidValue.VOID; }
public Name getTypeName() { for (int i = 0; i < nTypes; i++) if (((1 << possibleTypes[i].getIndex()) & typicalMask) != 0) return new Name(uri, possibleTypes[i].getName()); return null; }
public void visitNsNameExcept(String ns, NameClass ex) { probe(new Name(ns, IMPOSSIBLE)); ex.accept(this); }
public void visitNsNameExcept(String ns, NameClass ex) { probe(new Name(ns, IMPOSSIBLE)); ex.accept(this); }
public void visitName(Name name) { visitNsName(name.getNamespaceUri()); if (name.equals(new Name("", "xmlns"))) errorMessageId = "xmlns_attribute"; }
private static Name extractElementName(Object o) { NameNameClass nnc = (NameNameClass)((ElementPattern)o).getNameClass(); return new Name(nnc.getNamespaceUri(), nnc.getLocalName()); }
public void visitName(Name name) { visitNsName(name.getNamespaceUri()); if (name.equals(new Name("", "xmlns"))) errorMessageId = "xmlns_attribute"; }
private Name abstractElementName(GroupDefinition def) { Name name = new Name(getTargetNamespace(def.getParentSchema().getUri()), def.getName()); if (lookupElementName(name).globalType != null) return null; return name; }