Examples of StandaloneContext


Examples of net.sf.saxon.xpath.StandaloneContext

        long key = ((long)staticArgs.length)<<32 | (nameCode & 0xfffff);
        UserFunction fn = (UserFunction)functions.get(new Long(key));
        if (fn == null) {
            return null;
        }
        StandaloneContext env = new StandaloneContext(config); // this is needed only for the name pool
        UserFunctionCall fc = new UserFunctionCall();
        fc.setFunctionNameCode(nameCode);
        fc.setArguments(staticArgs);
        fc.setFunction(fn, env);
        fc.setStaticType(fn.getResultType());
View Full Code Here

Examples of net.sf.saxon.xpath.StandaloneContext

    public void checkArguments(StaticContext env) throws XPathException {
        super.checkArguments(env);
        if (operation != EVAL) {
            NamespaceResolver nsContext = env.getNamespaceResolver();
            staticContext = new StandaloneContext(env.getConfiguration());
            staticContext.setBaseURI(env.getBaseURI());
            staticContext.setDefaultFunctionNamespace(env.getDefaultFunctionNamespace());
            for (Iterator iter = nsContext.iteratePrefixes(); iter.hasNext();) {
                String prefix = (String)iter.next();
                String uri = nsContext.getURIForPrefix(prefix, true);
View Full Code Here

Examples of net.sf.saxon.xpath.StandaloneContext

        SAXSource ss = new SAXSource(is);
        XPathEvaluator xpe = new XPathEvaluator(ss);

        // Declare a variable for use in XPath expressions

        StandaloneContext sc = (StandaloneContext)xpe.getStaticContext();
        Variable wordVar = sc.declareVariable("word", "");

        // Compile the XPath expressions used by the application

        XPathExpression findLine =
            xpe.createExpression("//LINE[contains(., $word)]");
View Full Code Here

Examples of ro.isdc.wro.manager.factory.standalone.StandaloneContext

  /**
   * Creates a {@link StandaloneContext} by setting properties passed after mojo is initialized.
   */
  private StandaloneContext createStandaloneContext() {
    final StandaloneContext runContext = new StandaloneContext();
    runContext.setContextFoldersAsCSV(getContextFoldersAsCSV());
    runContext.setMinimize(isMinimize());
    runContext.setWroFile(getWroFile());
    runContext.setIgnoreMissingResourcesAsString(isIgnoreMissingResources());
    return runContext;
  }
View Full Code Here

Examples of ro.isdc.wro.manager.factory.standalone.StandaloneContext

  /**
   * Use {@link StandaloneContext} to tokenize the contextFoldersAsCSV value.
   */
  private String[] getContextFolders() {
    final StandaloneContext context = new StandaloneContext();
    context.setContextFoldersAsCSV(contextFoldersAsCSV);
    return context.getContextFolders();
  }
View Full Code Here

Examples of ro.isdc.wro.manager.factory.standalone.StandaloneContext

      @Override
      protected Properties createProperties() {
        return properties;
      }
    };
    final StandaloneContext context = new StandaloneContext();
    context.setWroFile(new File("/path/to/file"));
    victim.initialize(context);
    // create one instance for test
    final WroManager manager = victim.create();
    processorsFactory = manager.getProcessorsFactory();
  }
View Full Code Here

Examples of ro.isdc.wro.manager.factory.standalone.StandaloneContext

  private StandaloneServletContextUriLocator victim;
  private StandaloneContext standaloneContext;

  @Before
  public void setUp() {
    standaloneContext = new StandaloneContext();
    final String contextFolder = TestStandaloneServletContextUriLocator.class.getResource("").getFile();
    standaloneContext.setContextFoldersAsCSV(contextFolder);
    victim = new StandaloneServletContextUriLocator(standaloneContext);
  }
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.