Package client.net.sf.saxon.ce.expr

Examples of client.net.sf.saxon.ce.expr.XPathContext


     * @param visitor an expression visitor
     */

    public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException {
        try {
            XPathContext early = visitor.getStaticContext().makeEarlyEvaluationContext();
            final Item item1 = argument[1].evaluateItem(early);
            final String lex = item1.getStringValue();
            final Item item0 = argument[0].evaluateItem(early);
            String uri;
            if (item0 == null) {
View Full Code Here


     * @throws XPathException
     */
    private NodeInfo constructElement(XPathContext context, NodeInfo copiedNode) throws XPathException {
        try {
            Controller controller = context.getController();
            XPathContext c2 = context.newMinorContext();
            SequenceOutputter seq = controller.allocateSequenceOutputter(1);
            PipelineConfiguration pipe = controller.makePipelineConfiguration();
            seq.setPipelineConfiguration(pipe);

            int nameCode = getNameCode(c2, copiedNode);

            c2.setTemporaryReceiver(seq);
            if (seq.getSystemId() == null) {
                seq.setSystemId(getNewBaseURI(c2, copiedNode));
            }

            seq.open();
View Full Code Here

                out.append(it, NodeInfo.ALL_NAMESPACES);
            }
        } else {
            state = BUSY;
            Controller controller = context.getController();
            XPathContext c2 = savedXPathContext.newMinorContext();
            //c2.setOrigin(this);
            // Fork the output: one copy goes to a SequenceOutputter which remembers the contents for
            // use next time the variable is referenced; another copy goes to the current output destination.
            SequenceOutputter seq = controller.allocateSequenceOutputter(20);
            seq.setPipelineConfiguration(controller.makePipelineConfiguration());
            seq.open();
            TeeOutputter tee = new TeeOutputter(context.getReceiver(), seq);
            tee.setPipelineConfiguration(controller.makePipelineConfiguration());
            c2.setTemporaryReceiver(tee);

            expression.process(c2);

            seq.close();
            List list = seq.getList();
View Full Code Here

        }

    }

    private static XPathContextMajor getMajorCaller(XPathContext context) {
        XPathContext caller = context.getCaller();
        while (!(caller == null || caller instanceof XPathContextMajor)) {
            caller = caller.getCaller();
        }
        return (XPathContextMajor)caller;
    }
View Full Code Here

      * or more groups, one for each value of the grouping key.
     */

    private void buildIndexedGroups() throws XPathException {
        HashMap index = new HashMap(40);
        XPathContext c2 = keyContext.newMinorContext();
        c2.setCurrentIterator(population);
        while (true) {
            Item item = population.next();
            if (item==null) {
                break;
            }
View Full Code Here

    public int position() {
        return position;
    }

    public SequenceIterator getAnother() throws XPathException {
        XPathContext c2 = keyContext.newMinorContext();
        return new GroupByIterator(population.getAnother(), keyExpression, c2, collator);
    }
View Full Code Here

      NodeInfo eventNode = ((HTMLDocumentWrapper)config.getHostPage()).wrap(node);
      SequenceIterator bubbleElements = eventNode.iterateAxis(Axis.ANCESTOR, NodeKindTest.ELEMENT);
      Controller controller = stylesheet.newTransformer();
      try {
          controller.importControllerSettings(localController);
        XPathContext ruleContext = controller.newXPathContext();
        Mode matchedMode = getModeFromEvent(event);
       
        if (matchedMode == null) {
          return;
        }
View Full Code Here

TOP

Related Classes of client.net.sf.saxon.ce.expr.XPathContext

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.