Package org.xml.sax.helpers

Examples of org.xml.sax.helpers.AttributeListImpl.addAttribute()


            for (int x=0; x<this.undecl.size(); x++) {
                NamespacesTable.Declaration dec=null;
                dec=(NamespacesTable.Declaration)this.undecl.elementAt(x);
                String aname="xmlns";
                if (dec.getPrefix().length()>0) aname="xmlns:"+dec.getPrefix();
                a2.addAttribute(aname,"CDATA",dec.getUri());
            }
            this.undecl.clear();
        }
        // Set the real attributes
        for (int x=0; x<a.getLength(); x++) {
View Full Code Here


        for (int x=0; x<a.getLength(); x++) {
            NamespacesTable.Name aname=namespaces.resolve(a.getURI(x),
                                                          a.getQName(x),
                                                          null,
                                                          a.getLocalName(x));
            a2.addAttribute(aname.getQName(),a.getType(x),a.getValue(x));
        }
        // Call the document handler startElement() method.
        this.documentHandler.startElement(name.getQName(),a2);
    }
View Full Code Here

            for (int x=0; x<this.undecl.size(); x++) {
                NamespacesTable.Declaration dec=null;
                dec=(NamespacesTable.Declaration)this.undecl.elementAt(x);
                String aname="xmlns";
                if (dec.getPrefix().length()>0) aname="xmlns:"+dec.getPrefix();
                a2.addAttribute(aname,"CDATA",dec.getUri());
            }
            this.undecl.clear();
        }
        // Set the real attributes
        for (int x=0; x<a.getLength(); x++) {
View Full Code Here

        for (int x=0; x<a.getLength(); x++) {
            NamespacesTable.Name aname=namespaces.resolve(a.getURI(x),
                                                          a.getQName(x),
                                                          null,
                                                          a.getLocalName(x));
            a2.addAttribute(aname.getQName(),a.getType(x),a.getValue(x));
        }
        // Call the document handler startElement() method.
        this.documentHandler.startElement(name.getQName(),a2);
    }
View Full Code Here

    public void start( String name, String[] attributes ) {
       
        // create attributes.
        AttributeListImpl as = new AttributeListImpl();
        for( int i=0; i<attributes.length; i+=2 )
            as.addAttribute( attributes[i], "", attributes[i+1] );
       
        try {
            handler.startElement( name, as );
        } catch( SAXException e ) {
            throw new SAXRuntimeException(e);
View Full Code Here

            _namespaces.declareAsAttributes(attList, true);
        }
       
        //-- copy Attributes to AttributeList
        for (int i = 0; i < atts.getLength(); i++) {
          attList.addAttribute(atts.getQName(i), CDATA, atts.getValue(i));
        }
       
        _handler.startElement(qName, attList);
       
  }
View Full Code Here

                if (attUri != null)
                    attPrefix = _context.getNamespacePrefix(attUri);
                if (attPrefix != null && attPrefix.length() > 0)
                    xmlName = attPrefix + ':' + xmlName;
                value = tempNode.getStringValue();
                atts.addAttribute(xmlName, "CDATA", value);
                tempNode = tempNode.getNextSibling();
            }//attributes

            //-- namespace management
            _context = _context.createNamespaces();
View Full Code Here

    {
  AttributeListImpl attrList;

  attrList = new AttributeListImpl();
  if ( _namespace )
      attrList.addAttribute( "xmlns:" + XML.Namespace.Prefix, "CDATA", XML.Namespace.URI );
  else
      attrList.addAttribute( "xmlns", "CDATA", XML.Namespace.URI );
  _docHandler.startElement( prefix( XML.Namespace.Root ), attrList );
 
    }
View Full Code Here

  attrList = new AttributeListImpl();
  if ( _namespace )
      attrList.addAttribute( "xmlns:" + XML.Namespace.Prefix, "CDATA", XML.Namespace.URI );
  else
      attrList.addAttribute( "xmlns", "CDATA", XML.Namespace.URI );
  _docHandler.startElement( prefix( XML.Namespace.Root ), attrList );
 
    }

View Full Code Here

  enumeration = listDNs();
  while ( enumeration.hasMoreElements() ) {
      name = (String) enumeration.nextElement();
      policy = getDirectPolicy( name );
      attrList = new AttributeListImpl();
      attrList.addAttribute( Names.Attribute.DN, "ID", name );
      if ( ( policy & Policy.DeleteEmpty ) != 0 )
    attrList.addAttribute( Names.Attribute.DeleteEmpty, null, "true" );
      if ( ( policy & Policy.ReplaceAttr ) != 0 )
    attrList.addAttribute( Names.Attribute.ReplaceAttr, null, "true" );
      if ( ( policy & Policy.RefreshOnly ) != 0 )
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.