src/java.xml/share/classes/com/sun/xml/internal/stream/writers/XMLDOMWriterImpl.java
changeset 52902 e3398b2e1ab0
parent 48412 d4412e380f6b
equal deleted inserted replaced
52901:3ba9ff4d4aaf 52902:e3398b2e1ab0
   217                 throw new XMLStreamException("Namespace URI "+namespaceURI +
   217                 throw new XMLStreamException("Namespace URI "+namespaceURI +
   218                         "is not bound to any prefix" );
   218                         "is not bound to any prefix" );
   219             }
   219             }
   220 
   220 
   221             String qualifiedName = null;
   221             String qualifiedName = null;
   222             if(prefix.equals("")){
   222             if(prefix.isEmpty()){
   223                 qualifiedName = localName;
   223                 qualifiedName = localName;
   224             }else{
   224             }else{
   225                 qualifiedName = getQName(prefix,localName);
   225                 qualifiedName = getQName(prefix,localName);
   226             }
   226             }
   227             Attr attr = ownerDoc.createAttributeNS(namespaceURI, qualifiedName);
   227             Attr attr = ownerDoc.createAttributeNS(namespaceURI, qualifiedName);
   252             }
   252             }
   253             if(prefix == null){
   253             if(prefix == null){
   254                 throw new XMLStreamException("prefix cannot be null");
   254                 throw new XMLStreamException("prefix cannot be null");
   255             }
   255             }
   256             String qualifiedName = null;
   256             String qualifiedName = null;
   257             if(prefix.equals("")){
   257             if(prefix.isEmpty()){
   258                 qualifiedName = localName;
   258                 qualifiedName = localName;
   259             }else{
   259             }else{
   260 
   260 
   261                 qualifiedName = getQName(prefix,localName);
   261                 qualifiedName = getQName(prefix,localName);
   262             }
   262             }
   500             throw new XMLStreamException("NamespaceURI cannot be null");
   500             throw new XMLStreamException("NamespaceURI cannot be null");
   501         }
   501         }
   502 
   502 
   503         String qname = null;
   503         String qname = null;
   504 
   504 
   505         if (prefix.equals("")) {
   505         if (prefix.isEmpty()) {
   506             qname = XMLConstants.XMLNS_ATTRIBUTE;
   506             qname = XMLConstants.XMLNS_ATTRIBUTE;
   507         } else {
   507         } else {
   508             qname = getQName(XMLConstants.XMLNS_ATTRIBUTE,prefix);
   508             qname = getQName(XMLConstants.XMLNS_ATTRIBUTE,prefix);
   509         }
   509         }
   510 
   510 
   667             }
   667             }
   668             if(prefix == null){
   668             if(prefix == null){
   669                 throw new XMLStreamException("Prefix cannot be null");
   669                 throw new XMLStreamException("Prefix cannot be null");
   670             }
   670             }
   671 
   671 
   672             if(prefix.equals("")){
   672             if(prefix.isEmpty()){
   673                 qname = localName;
   673                 qname = localName;
   674             }else{
   674             }else{
   675                 qname = getQName(prefix,localName);
   675                 qname = getQName(prefix,localName);
   676             }
   676             }
   677 
   677