Examples of NamespaceNode


Examples of net.sf.saxon.tree.NamespaceNode

    XPathExpression xPathExpression = XPathFactory.newInstance().newXPath().compile("//namespace::*");
    List<NamespaceNode> nodeList = (ArrayList<NamespaceNode>) xPathExpression.evaluate(new StreamSource(new StringReader(xml)), XPathConstants.NODESET);
    Map<String, String> allNamespacesMap = new TreeMap<String, String>();
    if (nodeList != null) {
      for (int i = 0; i < nodeList.size(); i++) {
        NamespaceNode node = nodeList.get(i);

        if (!allNamespacesMap.containsKey(node.getLocalPart())) {
          allNamespacesMap.put(node.getLocalPart(), node.getStringValue());
        }
      }
    }

    return allNamespacesMap;
View Full Code Here

Examples of org.apache.flex.compiler.internal.tree.as.NamespaceNode

        break;
      }
            case NamespaceID:
            {
                // Skip over MetaTagsNode and NamespaceIdentifierNode
                final NamespaceNode nsNode = (NamespaceNode)node;
                final IASNode nsName = nsNode.getNameExpressionNode();
                final IASNode nsURI = nsNode.getNamespaceURINode();
                switch(index)
                {
                    case 0:
                        if(nsName != null)
                            result = nsName;
View Full Code Here

Examples of org.apache.flex.compiler.internal.tree.as.NamespaceNode

                    result++;
            }
            break;
            case NamespaceID:
            {
                final NamespaceNode nsNode = (NamespaceNode)node;
                assert nsNode.getNameExpressionNode() != null : "'name' node is required";
                result = 1;
                if (nsNode.getNamespaceURINode() != null)
                    result = 2;
                break;
            }
            default:
                result = node.getChildCount();
View Full Code Here

Examples of org.apache.flex.compiler.internal.tree.as.NamespaceNode

            case OverrideID:
                break;

            case NamespaceID:
            {
                NamespaceNode ns = (NamespaceNode) n;

                if ( ns.hasModifier(ASModifier.STATIC) )
                {
                    this.classScope.addProblem(new StaticNamespaceDefinitionProblem(ns));
                }
                else
                {
View Full Code Here

Examples of org.apache.flex.compiler.internal.tree.as.NamespaceNode

    /**
     *  Check a namespace declaration.
     */
    public void checkNamespaceDeclaration(IASNode iNode, Binding ns_name)
    {
        NamespaceNode nsNode = (NamespaceNode)iNode;

        IDefinition def = utils.getDefinition(nsNode);

        checkNamespaceOfDefinition(nsNode, def, project);
        SemanticUtils.checkScopedToDefaultNamespaceProblem(currentScope, nsNode, def, null);
       
        if (SemanticUtils.isInFunction(iNode))
        {
            if (iNode instanceof BaseDefinitionNode)
                checkForNamespaceInFunction((BaseDefinitionNode)iNode, currentScope);
        }
       
        // Check whether the namespace is being initialized to a deprecated namespace.
        IExpressionNode namespaceInitialValueNode = nsNode.getNamespaceURINode();
        if (namespaceInitialValueNode != null)
        {
            IDefinition namespaceInitialvalueDefinition = namespaceInitialValueNode.resolve(project);
            checkDeprecated(namespaceInitialValueNode, namespaceInitialvalueDefinition);
        }
View Full Code Here

Examples of org.eclipse.php.internal.ui.util.NamespaceNode

      }
      l.add(ns);
    }
    List<IType> result = new LinkedList<IType>();
    for (Entry<String, List<IType>> entry : aggregated.entrySet()) {
      result.add(new NamespaceNode(project, entry.getKey(), entry
          .getValue().toArray(new IType[entry.getValue().size()])));
    }
    return result.toArray();
  }
View Full Code Here

Examples of org.eclipse.php.internal.ui.util.NamespaceNode

      }
      l.add(ns);
    }
    List<IType> result = new LinkedList<IType>();
    for (Entry<String, List<IType>> entry : aggregated.entrySet()) {
      result.add(new NamespaceNode(create, entry.getKey(), entry
          .getValue().toArray(new IType[entry.getValue().size()])));
    }

    return result;
  }
View Full Code Here

Examples of org.jaxen.dom.NamespaceNode

        List result = xpath.selectNodes(doc);
        assertEquals(8, result.size());
        Iterator iterator = result.iterator();
        StringBuffer sb = new StringBuffer(4);
        while (iterator.hasNext()) {
            NamespaceNode ns = (NamespaceNode) iterator.next();
            if (ns.getNodeValue().equals("http://www.example.org/")) {
                String name = ns.getNodeName();
                sb.append(name);
            }
        }
        assertEquals("abcd", sb.toString());
       
View Full Code Here

Examples of org.jaxen.dom.NamespaceNode

        List result = xpath.selectNodes(doc);
        assertEquals(8, result.size());
        Iterator iterator = result.iterator();
        StringBuffer sb = new StringBuffer(4);
        while (iterator.hasNext()) {
            NamespaceNode ns = (NamespaceNode) iterator.next();
            if (ns.getNodeValue().equals("http://www.example.org/")) {
                String name = ns.getNodeName();
                sb.append(name);
            }
        }
        assertEquals("abcd", sb.toString());
       
View Full Code Here

Examples of org.jaxen.dom.NamespaceNode

        XPath xpath = new DOMXPath("namespace::node()");
        List result = xpath.selectNodes(root);
       
        Iterator iterator = result.iterator();
        while (iterator.hasNext()) {
            NamespaceNode node = (NamespaceNode) iterator.next();
            if (node.getLocalName() == null) rootNS = node;
            else if (node.getLocalName().equals("xml")) xmlNS = node;
            else if (node.getLocalName().equals("pre")) attributeNS = node;
        }
       
    }    
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.