Package org.eclipse.wst.xml.core.internal.contentmodel.util

Examples of org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceTable


          }
        }
                              
        // in this case we should consider all of the schema related to this document
        //
        NamespaceTable namespaceTable = new NamespaceTable(element.getOwnerDocument());
        namespaceTable.addElementLineage(element);
        List list = namespaceTable.getNamespaceInfoList();
        for (Iterator i = list.iterator(); i.hasNext();)
        {
          NamespaceInfo info = (NamespaceInfo)i.next();
          if (info.uri != null && !info.uri.equals(excludedURI))
          {
View Full Code Here


    if (cmNode != null && cmNode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION)
    {                        
      CMAttributeDeclaration ad = (CMAttributeDeclaration)cmNode;                             
      if (valueHelper.isXSIType(ad))
      {            
        NamespaceTable table = new NamespaceTable(element.getOwnerDocument());
        table.addElementLineage(element);
        list.addAll(valueHelper.getQualifiedXSITypes(ad, table));    
      }
    }
  }
View Full Code Here

     
  public CMDocument getCMDocument(Element element, String uri)
  {
    CMDocument result = null;
    NamespaceTable namespaceTable = new NamespaceTable(element.getOwnerDocument());
    namespaceTable.addElementLineage(element);
    NamespaceInfo namespaceInfo = namespaceTable.getNamespaceInfoForURI(uri);
    if (namespaceInfo != null)
    {
      result = getCMDocument(namespaceInfo.uri, namespaceInfo.locationHint, "XSD"); //$NON-NLS-1$
    }
    return result;
View Full Code Here

    }   
    else
   
      // here we use a namespaceTable to consider if the root element has any namespace information
      //
      NamespaceTable namespaceTable = new NamespaceTable(element.getOwnerDocument());
      List list = NamespaceTable.getElementLineage(element);
      Element rootElement = (Element)list.get(0);
      namespaceTable.addElement(rootElement);
        
      if (namespaceTable.isNamespaceEncountered())
      {                                        
        // we assume that this is an XMLSchema style namespace aware document
        result = getCMElementDeclaration(element, list, namespaceTable);
      }
      else
View Full Code Here

      String uri = resolveGrammarURI(document, implicitDoctype[0], implicitDoctype[1]);
      result.add(new CMDocumentReferenceImpl(implicitDoctype[0], uri));
    }                             
    else
    {  
      NamespaceTable namespaceTable = new NamespaceTable(document);
      if (node.getNodeType() == Node.ELEMENT_NODE)
      {
        namespaceTable.addElement((Element)node);
      }                                    
      if (deep)
      {
        addChildElementsToNamespaceTable(node, namespaceTable);
      }
      List list = namespaceTable.getNamespaceInfoList();
      for (Iterator i = list.iterator(); i.hasNext();)
      {
        NamespaceInfo info = (NamespaceInfo) i.next();   
        String uri = resolveGrammarURI(document, info.uri, info.locationHint);
        result.add(new CMDocumentReferenceImpl(info.uri, uri));
View Full Code Here

          }
        }
                              
        // in this case we should consider all of the schema related to this document
        //
        NamespaceTable namespaceTable = new NamespaceTable(element.getOwnerDocument());
        namespaceTable.addElementLineage(element);
        List list = namespaceTable.getNamespaceInfoList();
        for (Iterator i = list.iterator(); i.hasNext();)
        {
          NamespaceInfo info = (NamespaceInfo)i.next();
          if (info.uri != null && !info.uri.equals(excludedURI))
          {
View Full Code Here

    if (cmNode != null && cmNode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION)
    {                        
      CMAttributeDeclaration ad = (CMAttributeDeclaration)cmNode;                             
      if (valueHelper.isXSIType(ad))
      {            
        NamespaceTable table = new NamespaceTable(element.getOwnerDocument());
        table.addElementLineage(element);
        list.addAll(valueHelper.getQualifiedXSITypes(ad, table));    
      }
    }
  }
View Full Code Here

   * @param namespaceUri namespace URI to examine
   * @return namespace prefix for the given URI
   */
  public static String getPrefixForNamespaceUri(IDOMDocument doc, String namespaceUri) {
    if (doc != null && namespaceUri != null) {
      NamespaceTable table = new NamespaceTable(doc);
      Element elem = doc.getDocumentElement();
      table.addElementLineage(elem);
      return table.getPrefixForURI(namespaceUri);
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.xml.core.internal.contentmodel.util.NamespaceTable

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.