Package org.w3c.dom

Examples of org.w3c.dom.Entity


        }
        case Node.DOCUMENT_NODE : {
            DocumentType      docType;
            DOMImplementation domImpl;
            NamedNodeMap      map;
            Entity            entity;
            Notation          notation;
            int               i;
           
            // If there is a document type, use the SAX events to
            // serialize it.
View Full Code Here


            //revisit: how to check if entity was already declared.
            // XML spec says that 1st Entity decl is binding.

            String entityName = fStringPool.toString(entityNameIndex);

            Entity entity = fDocumentImpl.createEntity(entityName);
            fDocumentType.getEntities().setNamedItem(entity);

            // REVISIT: Entities were removed from latest working draft. -Ac
            // create internal entity declaration
            if (fGrammarAccess) {
View Full Code Here

                ((EntityReferenceImpl)newnode).isReadOnly(false);
    break;
            }

          case ENTITY_NODE: {
    Entity srcentity = (Entity)source;
    EntityImpl newentity =
        (EntityImpl)createEntity(source.getNodeName());
    newentity.setPublicId(srcentity.getPublicId());
    newentity.setSystemId(srcentity.getSystemId());
    newentity.setNotationName(srcentity.getNotationName());
    // Kids carry additional value
                newentity.isReadOnly(false); // allow deep import temporarily
    newnode = newentity;
    break;
            }
View Full Code Here

            boolean orig = ownerDocument.getMutationEvents();
            ownerDocument.setMutationEvents(false);

            NamedNodeMap entities = doctype.getEntities();
            if (entities != null) {
                Entity entity = (Entity)entities.getNamedItem(getNodeName());
                if (entity != null) {

                    // we found the entity
                    found = true;

                    // clone entity at this reference
                    boolean ro = isReadOnly();
                    isReadOnly(false);
                    Node child = entity.getFirstChild();
                    while (child != null) {
                        appendChild(child.cloneNode(true));
                        child = child.getNextSibling();
                    }
                    // set it back to readonly if what it was
View Full Code Here

                    Comment v = (Comment)node;
                    ps.print("COMMENT:"); // $NON-NLS-1$
                    ps.print(" text='"+v.getData()+"'"); // $NON-NLS-1$
                } break;
                case Node.ENTITY_NODE: {
                    Entity v = (Entity)node;
                    ps.print("ENTITY:"); // $NON-NLS-1$
                } break;
                case Node.ENTITY_REFERENCE_NODE: {
                    EntityReference v = (EntityReference)node;
                    ps.print("ENTITY REFERENCE:"); // $NON-NLS-1$
View Full Code Here

    if (null != doctype)
    {
      NamedNodeMap entities = doctype.getEntities();
      if(null == entities)
        return url;
      Entity entity = (Entity) entities.getNamedItem(name);
      if(null == entity)
        return url;
     
      String notationName = entity.getNotationName();

      if (null != notationName// then it's unparsed
      {
        // The draft says: "The XSLT processor may use the public
        // identifier to generate a URI for the entity instead of the URI
        // specified in the system identifier. If the XSLT processor does
        // not use the public identifier to generate the URI, it must use
        // the system identifier; if the system identifier is a relative
        // URI, it must be resolved into an absolute URI using the URI of
        // the resource containing the entity declaration as the base
        // URI [RFC2396]."
        // So I'm falling a bit short here.
        url = entity.getSystemId();

        if (null == url)
        {
          url = entity.getPublicId();
        }
        else
        {
          // This should be resolved to an absolute URL, but that's hard
          // to do from here.
View Full Code Here

               
                if (entities == null) {
                    return uri;
                }
               
                Entity entity = (Entity) entities.getNamedItem(name);
               
                if (entity == null) {
                    return uri;
                }
               
                String notationName = entity.getNotationName();
                if (notationName != null) {
                    uri = entity.getSystemId();
                    if (uri == null) {
                        uri = entity.getPublicId();
                    }
                }
            }
            return uri;
        }
View Full Code Here

    if (null != doctype)
    {
      NamedNodeMap entities = doctype.getEntities();
      if(null == entities)
        return url;
      Entity entity = (Entity) entities.getNamedItem(name);
      if(null == entity)
        return url;
     
      String notationName = entity.getNotationName();

      if (null != notationName// then it's unparsed
      {
        // The draft says: "The XSLT processor may use the public
        // identifier to generate a URI for the entity instead of the URI
        // specified in the system identifier. If the XSLT processor does
        // not use the public identifier to generate the URI, it must use
        // the system identifier; if the system identifier is a relative
        // URI, it must be resolved into an absolute URI using the URI of
        // the resource containing the entity declaration as the base
        // URI [RFC2396]."
        // So I'm falling a bit short here.
        url = entity.getSystemId();

        if (null == url)
        {
          url = entity.getPublicId();
        }
        else
        {
          // This should be resolved to an absolute URL, but that's hard
          // to do from here.
View Full Code Here

      if (null != doctype)
      {
        NamedNodeMap entities = doctype.getEntities();
        if(null == entities)
          return url;
        Entity entity = (Entity) entities.getNamedItem(name);
        if(null == entity)
          return url;
       
        String notationName = entity.getNotationName();
 
        if (null != notationName// then it's unparsed
        {
          // The draft says: "The XSLT processor may use the public
          // identifier to generate a URI for the entity instead of the URI
          // specified in the system identifier. If the XSLT processor does
          // not use the public identifier to generate the URI, it must use
          // the system identifier; if the system identifier is a relative
          // URI, it must be resolved into an absolute URI using the URI of
          // the resource containing the entity declaration as the base
          // URI [RFC2396]."
          // So I'm falling a bit short here.
          url = entity.getSystemId();
 
          if (null == url)
          {
            url = entity.getPublicId();
          }
          else
          {
            // This should be resolved to an absolute URL, but that's hard
            // to do from here.
View Full Code Here

            //revisit: how to check if entity was already declared.
            // XML spec says that 1st Entity decl is binding.

            String entityName = fStringPool.toString(entityNameIndex);

            Entity entity = fDocumentImpl.createEntity(entityName);
            fDocumentType.getEntities().setNamedItem(entity);

            // REVISIT: Entities were removed from latest working draft. -Ac
            // create internal entity declaration
            if (fGrammarAccess) {
View Full Code Here

TOP

Related Classes of org.w3c.dom.Entity

Copyright © 2018 www.massapicom. 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.