in nbxml/src/main/java/org/apache/vysper/xml/fragment/XMLElement.java [74:89]
public XMLElement(String namespaceURI, String name, String namespacePrefix, List<Attribute> attributes,
List<XMLFragment> innerFragments, Map<String, String> namespaces) {
this.namespaceURI = namespaceURI == null ? Namespaces.DEFAULT_NAMESPACE_URI : namespaceURI;
if(namespacePrefix != null && namespacePrefix.length() > 0) {
if(!isValidName(namespacePrefix) || namespacePrefix.contains(":")) throw new IllegalArgumentException("Invalid XML element namespace prefix");
}
this.namespacePrefix = namespacePrefix == null ? Namespaces.DEFAULT_NAMESPACE_PREFIX : namespacePrefix;
if(name == null || !isValidName(name)) throw new IllegalArgumentException("Invalid XML element name");
this.name = name;
this.attributes = (attributes == null) ? Collections.EMPTY_LIST : Collections.unmodifiableList(attributes);
this.namespaces = (namespaces == null) ? Collections.EMPTY_MAP : Collections.unmodifiableMap(namespaces);
this.innerFragments = (innerFragments == null) ? Collections.EMPTY_LIST : Collections
.unmodifiableList(innerFragments);
}