code: final static public Element newElement(QualifiedName elementName, QualifiedName value) {
  	org.w3c.dom.Document doc = builder.newDocument();
  	Element el = doc.createElementNS(elementName.getNamespaceURI(),
  					 qualifiedNameToString(elementName.toQName()));
  	
  	// 1. we add an xsi:type="xsd:QName" attribute
  	//   making sure xsi and xsd prefixes are appropriately declared.
  	el.setAttributeNS(NamespacePrefixMapper.XSI_NS, "xsi:type", "xsd:QName");
  	el.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xsd", XSD_NS_FOR_XML);
  
  	// 2. We add the QualifiedName's string representation as child of the element
  	//    This representation depends on the extant prefix-namespace mapping
  	String valueAsString=qualifiedNameToString(value.toQName());
  	el.appendChild(doc.createTextNode(valueAsString));
  	
  	// 3. We make sure that the QualifiedName's prefix is given the right namespace, or the default namespace is declared if there is no prefix
  	int index=valueAsString.indexOf(":");
  	if (index!=-1) {
  	    String prefix = valueAsString.substring(0, index);
  	    el.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:"+prefix, convertNsToXml(value.getNamespaceURI()));
  	} else {
  	    el.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", convertNsToXml(value.getNamespaceURI()));
  	}
  	
  	doc.appendChild(el);
  	return el;
      }
docs: Creates a DOM {@link Element} for a {@link QualifiedName} and content given by value
  
  @param elementName a {@link QualifiedName} to denote the element name
  @param value for the created {@link Element}
  @return a new {@link Element}