Examples of NamespaceManager


Examples of eu.admire.dispel.parser.state.NamespaceManager

        appendParameters(function, dispel, usedTypes, dtypePrefix);
        dispel.append(")\n");
        Tree ast = function.getBody();
        convertTree(ast, usedTypes, dtypePrefix, dispel);
        usedTypes.removeAll(function.getParameters().keySet());
        NamespaceManager ns = function.getNamespaceManager();
        // declare namespaces at the top of the file
        dispel.insert(0,"\n");
        for (String prefix : dtypePrefix)
        {
            dispel.insert(0, "\";\n");
            dispel.insert(0, ns.resolvePrefix(prefix));
            dispel.insert(0, " \"");
            dispel.insert(0, prefix);
            dispel.insert(0, "namespace ");
        }
        // write the used processing elements to the top of the file
        dispel.insert(0,"\n");
        for (String pe : usedTypes)
        {
            dispel.insert(0, ";\n");
            dispel.insert(0, ns.resolve(pe));
            dispel.insert(0, "use ");
        }
        // wrap the package qualifier around the function if there is one
        wrapPackage(function.getName(), dispel);
        return dispel.toString();
View Full Code Here

Examples of org.apache.xmlbeans.impl.values.NamespaceManager

        {
            ps.println( "No dump produced (assert needs to be enabled)" );
            return;
        }

        NamespaceManager nsm = new DumpNsManager( ps );

        if (msg != null)
            ps.println( msg );
        else
            ps.println( "Dump:" );
View Full Code Here

Examples of org.apache.xmlbeans.impl.values.NamespaceManager

        {
            ps.println( "No dump produced (assert needs to be enabled)" );
            return;
        }

        NamespaceManager nsm = new DumpNsManager( ps );

        if (msg != null)
            ps.println( msg );
        else
            ps.println( "Dump:" );
View Full Code Here

Examples of org.apache.xmlbeans.impl.values.NamespaceManager

        {
            ps.println( "No dump produced (assert needs to be enabled)" );
            return;
        }

        NamespaceManager nsm = new DumpNsManager( ps );

        if (msg != null)
            ps.println( msg );
        else
            ps.println( "Dump:" );
View Full Code Here

Examples of org.dyno.visual.swing.base.NamespaceManager

  public void requestGlobalNewName() {
    if (getName() == null) {
      VisualDesigner designer = VisualSwingPlugin.getCurrentDesigner();
      if (designer != null) {
        NamespaceManager namespace = designer.getNamespace();
        if (namespace != null)
          setName(namespace.nextName(getBasename()));
      }
    }
  }
View Full Code Here

Examples of org.mule.module.xml.util.NamespaceManager

        return JXPathContext.newContext(payload);
    }

    private Object getExpressionValue(JXPathContext context, String expression)
    {
        NamespaceManager theNamespaceManager = getNamespaceManager();
        if (theNamespaceManager != null)
        {
            addNamespacesToContext(theNamespaceManager, context);
        }
View Full Code Here

Examples of org.mule.module.xml.util.NamespaceManager

        return "xml-namespace-config.xml";
    }

    public void testGlobalNamespaces() throws Exception
    {
        NamespaceManager manager = muleContext.getRegistry().lookupObject(NamespaceManager.class);
        assertNotNull(manager);
        assertTrue(manager.isIncludeConfigNamespaces());
        assertEquals(5, manager.getNamespaces().size());
    }
View Full Code Here

Examples of org.mule.module.xml.util.NamespaceManager

        assertNull(value);
    }

    public void testXmlWithInvalidNameSpaceIfNameSpaceAliasIsDefined() throws MalformedURLException, RegistrationException
    {
        NamespaceManager namespaceManager = new NamespaceManager();
        Map namespaces = new HashMap();
        namespaces.put("f", "http://www.w3schools.com/furniture");
        namespaceManager.setNamespaces(namespaces);
        muleContext.getRegistry().registerObject(MuleProperties.OBJECT_MULE_NAMESPACE_MANAGER, namespaceManager);

        DefaultMuleMessage msg = new DefaultMuleMessage(XML_USING_UNDEFINED_NAMESPACE, muleContext);

        JXPathExpressionEvaluator e = new JXPathExpressionEvaluator();
View Full Code Here

Examples of org.mule.module.xml.util.NamespaceManager

        // clear any configured namespaces
        syncXmlSplitter.setNamespaces(null);
        asyncXmlSplitter.setNamespaces(null);

        // configure a global namespace manager
        NamespaceManager namespaceManager = muleContext.getRegistry().lookupObject(NamespaceManager.class);
        if (namespaceManager == null)
        {
            namespaceManager = new NamespaceManager();
            muleContext.getRegistry().registerObject(MuleProperties.OBJECT_MULE_NAMESPACE_MANAGER, namespaceManager);
        }
        Map namespaces = new HashMap();
        namespaces.put("e", "http://www.example.com");
        syncXmlSplitter.setSplitExpression("/e:purchaseOrder/e:items/e:item");
        asyncXmlSplitter.setSplitExpression("/e:purchaseOrder/e:items/e:item");
        namespaceManager.setNamespaces(namespaces);

        // re-init splitters
        syncXmlSplitter.initialise();
        asyncXmlSplitter.initialise();
View Full Code Here

Examples of org.mule.module.xml.util.NamespaceManager

        assertEquals("http://www.test.com/g", extractor.getNamespaces().get("g"));
    }

    private void registerNamespaces() throws RegistrationException
    {
        final NamespaceManager namespaceManager = new NamespaceManager();
        final Map<String, String> namespaces = new HashMap<String, String>();
        namespaces.put("f", "http://www.w3schools.com/furniture");
        namespaceManager.setNamespaces(namespaces);
        muleContext.getRegistry().unregisterObject(MuleProperties.OBJECT_MULE_NAMESPACE_MANAGER);
        muleContext.getRegistry().registerObject(MuleProperties.OBJECT_MULE_NAMESPACE_MANAGER,
            namespaceManager);
    }
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.