Examples of AttrImpl


Examples of org.apache.axiom.om.impl.dom.AttrImpl

        OMAttribute omAttribute = this.getAttribute(
                new QName(soapEnvelopeNamespaceURI, attributeName));
        if (omAttribute != null) {
            omAttribute.setAttributeValue(attrValue);
        } else {
            OMAttribute attribute = new AttrImpl(this.ownerNode, attributeName,
                                                 new NamespaceImpl(soapEnvelopeNamespaceURI,
                                                                   SOAPConstants.SOAP_DEFAULT_NAMESPACE_PREFIX),
                                                 attrValue, this.factory);
            this.addAttribute(attribute);
        }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.AttrImpl

        return text;
    }

    public OMAttribute createOMAttribute(String localName, OMNamespace ns,
            String value) {
        return new AttrImpl(this.getDocument(), localName, ns, value, this);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.AttrImpl

        return text;
    }

    public OMAttribute createOMAttribute(String localName, OMNamespace ns,
                                         String value) {
        return new AttrImpl(this.getDocument(), localName, ns, value, this);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.dom.AttrImpl

    }


    public void setLang(String lang) {
        langAttr =
                new AttrImpl(this.ownerNode,
                             SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
                             langNamespace,
                             lang, this.factory);
        this.addAttribute(langAttr);
    }
View Full Code Here

Examples of org.apache.axis2.om.impl.dom.AttrImpl

    parent.addChild(text);
    return text;
    }
 
  public OMAttribute createOMAttribute(String localName, OMNamespace ns, String value) {
    return new AttrImpl(localName,ns, value);
  }
View Full Code Here

Examples of org.apache.xerces.dom.AttrImpl

                // create attribute and set properties
                boolean nsEnabled = false;
                try { nsEnabled = getNamespaces(); }
                catch (SAXException s) {}
                AttrImpl attr;
                if (nsEnabled) {
                    attr = (AttrImpl)fDocumentImpl.createAttributeNS(fStringPool.toString(attributeDecl.uri),attrName);
                }
                else{
                    attr = (AttrImpl)fDocumentImpl.createAttribute(attrName);
                }
                attr.setValue(attrValue);
                attr.setSpecified(false);

                // add default attribute to element definition
                if(nsEnabled){
                    elementDef.getAttributes().setNamedItemNS(attr);
                }
View Full Code Here

Examples of org.apache.xerces.dom.AttrImpl

                // create attribute and set properties
                boolean nsEnabled = false;
                try { nsEnabled = getNamespaces(); }
                catch (SAXException s) {}
                AttrImpl attr;
                if (nsEnabled) {
        String namespaceURI = fStringPool.toString(attributeDecl.uri);
        // DOM Level 2 wants all namespace declaration attributes
        // to be bound to "http://www.w3.org/2000/xmlns/"
        // So as long as the XML parser doesn't do it, it needs to
        // done here.
        String prefix = fStringPool.toString(attributeDecl.prefix);
                    // hide that our parser uses an empty string for null
                    if (namespaceURI.length() == 0) {
                        namespaceURI = null;
                    }
        if (namespaceURI == null) {
      if (prefix != null) {
          if (prefix.equals("xmlns")) {
        namespaceURI = "http://www.w3.org/2000/xmlns/";
          }
      } else if (attrName.equals("xmlns")) {
          namespaceURI = "http://www.w3.org/2000/xmlns/";
      }
        }
                    attr = (AttrImpl)fDocumentImpl.createAttributeNS(namespaceURI,attrName);
                }
                else{
                    attr = (AttrImpl)fDocumentImpl.createAttribute(attrName);
                }
                attr.setValue(attrValue);
                attr.setSpecified(false);

                // add default attribute to element definition
                if(nsEnabled){
                    elementDef.getAttributes().setNamedItemNS(attr);
                }
View Full Code Here

Examples of org.apache.xerces.dom.AttrImpl

                // NOTE: The specified value MUST be set after you set
                //       the node value because that turns the "specified"
                //       flag to "true" which may overwrite a "false"
                //       value from the attribute list. -Ac
        if (fDocumentImpl != null) {
          AttrImpl attrImpl = (AttrImpl) attr;
          Object type = null;
          boolean id = false;

          // REVISIT: currently it is possible that someone turns off
          // namespaces and turns on xml schema validation
          // To avoid classcast exception in AttrImpl check for namespaces
          // however the correct solution should probably disallow setting
          // namespaces to false when schema processing is turned on.
          if (attrPSVI != null && fNamespaceAware) {
            // XML Schema
            type = attrPSVI.getMemberTypeDefinition();
            if (type == null) {
              type = attrPSVI.getTypeDefinition();
              if (type != null) {
                id = ((XSSimpleType) type).isIDType();
                attrImpl.setType(type);
              }
            }
            else {
              id = ((XSSimpleType) type).isIDType();
              attrImpl.setType(type);
            }
          }
          else {
            // DTD
                        type = attributes.getType(i);
            attrImpl.setType(type);
            id = (type.equals("ID")) ? true : false;
          }
               
          if (id) {
            ((ElementImpl) el).setIdAttributeNode(attr, true);
          }

          attrImpl.setSpecified(attributes.isSpecified(i));
          // REVISIT: Handle entities in attribute value.
                }
            }
            setCharacterData(false);
           
View Full Code Here

Examples of org.apache.xerces.dom.AttrImpl

                // REVISIT: Check for uniqueness of element name? -Ac

                // create attribute and set properties
                boolean nsEnabled = fNamespaceAware;
                AttrImpl attr;
                if (nsEnabled) {
                    String namespaceURI = null;
                    // DOM Level 2 wants all namespace declaration attributes
                    // to be bound to "http://www.w3.org/2000/xmlns/"
                    // So as long as the XML parser doesn't do it, it needs to
                    // done here.
                    if (attributeName.startsWith("xmlns:") ||
                        attributeName.equals("xmlns")) {
                        namespaceURI = NamespaceContext.XMLNS_URI;
                    }
                    attr = (AttrImpl)fDocumentImpl.createAttributeNS(namespaceURI,
                                                                attributeName);
                }
                else {
                    attr = (AttrImpl)fDocumentImpl.createAttribute(attributeName);
                }
                attr.setValue(defaultValue.toString());
                attr.setSpecified(false);
                attr.setIdAttribute(type.equals("ID"));

                // add default attribute to element definition
                if (nsEnabled){
                    elementDef.getAttributes().setNamedItemNS(attr);
                }
View Full Code Here

Examples of org.apache.xerces.dom.AttrImpl

                // create attribute and set properties
                boolean nsEnabled = false;
                try { nsEnabled = getNamespaces(); }
                catch (SAXException s) {}
                AttrImpl attr;
                if (nsEnabled) {
        String namespaceURI = fStringPool.toString(attributeDecl.uri);
        // DOM Level 2 wants all namespace declaration attributes
        // to be bound to "http://www.w3.org/2000/xmlns/"
        // So as long as the XML parser doesn't do it, it needs to
        // done here.
        String prefix = fStringPool.toString(attributeDecl.prefix);
                    // hide that our parser uses an empty string for null
                    if (namespaceURI.length() == 0) {
                        namespaceURI = null;
                    }
        if (namespaceURI == null) {
      if (prefix != null) {
          if (prefix.equals("xmlns")) {
        namespaceURI = "http://www.w3.org/2000/xmlns/";
          }
      } else if (attrName.equals("xmlns")) {
          namespaceURI = "http://www.w3.org/2000/xmlns/";
      }
        }
                    attr = (AttrImpl)fDocumentImpl.createAttributeNS(namespaceURI,attrName);
                }
                else{
                    attr = (AttrImpl)fDocumentImpl.createAttribute(attrName);
                }
                attr.setValue(attrValue);
                attr.setSpecified(false);

                // add default attribute to element definition
                if(nsEnabled){
                    elementDef.getAttributes().setNamedItemNS(attr);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.