Package org.w3c.dom

Examples of org.w3c.dom.DocumentType


        // no need to synchronize again
        needsSyncChildren(false);

        // get children
        DocumentType doctype = ownerDocument.getDoctype();
        boolean found = false;
        if (doctype != null) {

            // we don't want to generate any event for this so turn them off
            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
View Full Code Here


                case Node.DOCUMENT_FRAGMENT_NODE: {
                    DocumentFragment v = (DocumentFragment)node;
                    ps.print("DOCUMENT FRAGMENT:"); // $NON-NLS-1$
                } break;
                case Node.DOCUMENT_TYPE_NODE: {
                    DocumentType v = (DocumentType)node;
                    ps.print("DOCUMENT TYPE:"); // $NON-NLS-1$
                } break;
                case Node.ELEMENT_NODE: {
                    Element v = (Element)node;
                    ps.print("ELEMENT:"); // $NON-NLS-1$
                    ps.print(" name='"+v.getTagName()+"'"); // $NON-NLS-1$
                } break;
                case Node.ATTRIBUTE_NODE: {
                    Attr v = (Attr)node;
                    ps.print("ATTRIBUTE:"); // $NON-NLS-1$
                    ps.print(" name='"+v.getName()+"'"); // $NON-NLS-1$
                    ps.print(" value='"+v.getValue()+"'"); // $NON-NLS-1$
                } break;
                case Node.CDATA_SECTION_NODE: {
                    CharacterData v = (CharacterData)node;
                    ps.print("CDATA:"); // $NON-NLS-1$
                    ps.print(" text='"+v.getData()+"'"); // $NON-NLS-1$
                } break;
                case Node.TEXT_NODE: {
                    Text v = (Text)node;
                    ps.print("TEXT:"); // $NON-NLS-1$
                    ps.print(" text='"+v.getData()+"'"); // $NON-NLS-1$
                } break;
                case Node.COMMENT_NODE: {
                    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;
View Full Code Here

    if (name == null || name.equals(""))
      name = stylesheetPath.getTail();

    String systemId = null;

    DocumentType dtd = null;
    Document owner = null;

    if (basenode == null) {
    }
    else if (basenode.getOwnerDocument() != null) {
      owner = basenode.getOwnerDocument();
      dtd = owner.getDoctype();
    }
    else if (basenode instanceof Document) {
      owner = (Document) basenode;
      dtd = owner.getDoctype();
    }
   
    if (basenode instanceof CauchoNode)
      systemId = ((CauchoNode) basenode).getBaseURI();

    Path pwd = stylesheetPath.getParent();

    if (systemId == null && owner instanceof QDocument)
      systemId = ((QDocument) owner).getSystemId();

    if (systemId == null && dtd != null)
      systemId = dtd.getSystemId();

    if (systemId == null)
      systemId = stylesheetPath.getURL();

    Node doc = null;
View Full Code Here

  {
    Document doc = node.getOwnerDocument();
    if (node instanceof Document)
      doc = (Document) node;
   
    DocumentType dtd = doc.getDoctype();
   
    if (dtd != null && dtd.getSystemId() != null)
      return generate(node, getSearchPath().lookup(dtd.getSystemId()));
    else if (doc instanceof CauchoDocument) {
      String systemId = ((CauchoDocument) doc).getFilename();
   
      return generate(node, getSearchPath().lookup(systemId));
    }
View Full Code Here

        if (path == null && xsl != null) {
          Document doc = xsl.getOwnerDocument();
          if (doc == null && xsl instanceof Document)
            doc = (Document) xsl;

          DocumentType dtd = doc.getDoctype();
          String systemId = null;
          if (dtd != null)
            systemId = dtd.getSystemId();

          if (systemId != null)
            path = getStylePath().lookup(systemId);
        }
     
View Full Code Here

        Element root = document.getRootElement();
        String rootName = root.getQualifiedName();
        String rootNamespace = root.getNamespaceURI();
        DocType doctype = document.getDocType();    
        DocumentType domDOCTYPE = null;
        if (doctype != null) {
            domDOCTYPE = impl.createDocumentType(rootName,
            doctype.getPublicID(), doctype.getSystemID());  
        }     
       
View Full Code Here

   */
  public String getUnparsedEntityURI(String name, Document doc)
  {

    String url = "";
    DocumentType doctype = doc.getDoctype();

    if (null != doctype)
    {
      NamedNodeMap entities = doctype.getEntities();
      if(null == entities)
        return url;
      Entity entity = (Entity) entities.getNamedItem(name);
      if(null == entity)
        return url;
View Full Code Here

    public String getUnparsedEntityURI(String name)
    {
        // Special handling for DOM input
        if (_document != null) {
            String uri = "";
            DocumentType doctype = _document.getDoctype();
            if (doctype != null) {
                NamedNodeMap entities = doctype.getEntities();
               
                if (entities == null) {
                    return uri;
                }
               
View Full Code Here

   */
  public String getUnparsedEntityURI(String name, Document doc)
  {

    String url = "";
    DocumentType doctype = doc.getDoctype();

    if (null != doctype)
    {
      NamedNodeMap entities = doctype.getEntities();
      if(null == entities)
        return url;
      Entity entity = (Entity) entities.getNamedItem(name);
      if(null == entity)
        return url;
View Full Code Here

    else
      doc = m_root.getOwnerDocument();

    if (null != doc)
    {
      DocumentType dtd = doc.getDoctype();

      if (null != dtd)
      {
        return dtd.getSystemId();
      }
    }

    return null;
  }
View Full Code Here

TOP

Related Classes of org.w3c.dom.DocumentType

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.