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

Examples of client.net.sf.saxon.ce.expr.parser.CodeInjector


        try {
            exp = makeExpressionVisitor().typeCheck(exp, Type.ITEM_TYPE);
            exp = ExpressionTool.resolveCallsToCurrentFunction(exp, getConfiguration());
            if (LogConfiguration.loggingIsEnabled() && LogController.traceIsEnabled()) {
              CodeInjector injector = ((XSLTTraceListener)LogController.getTraceListener()).getCodeInjector();
              String name = "";
              exp = injector.inject(exp, getStaticContext(), Location.XPATH_IN_XSLT, new StructuredQName("", "", name));
            }
            return exp;
        } catch (XPathException err) {
            // we can't report a dynamic error such as divide by zero unless the expression
            // is actually executed.
View Full Code Here


                    // The test for XSLParam and XSLSort is to eliminate whitespace nodes that have been retained
                    // because of xml:space="preserve"
                    Instruction text = new ValueOf(new StringLiteral(node.getStringValue()), false);
                    text.setSourceLocator(this);
                    if (LogConfiguration.loggingIsEnabled() && LogController.traceIsEnabled()) {
                      CodeInjector injector = ((XSLTTraceListener)LogController.getTraceListener()).getCodeInjector();
                        Expression tracer = injector.inject(text, getStaticContext(), StandardNames.XSL_TEXT, null);
                        tracer.setSourceLocator(this);
                        if (tracer instanceof Instruction) {
                          text = (Instruction)tracer;
                        }
                    }
View Full Code Here

  public static Expression makeTraceInstruction(StyleElement source, Expression child) {
    if (child instanceof TraceExpression && !(source instanceof StylesheetProcedure)) {
      return child;
      // this can happen, for example, after optimizing a compile-time xsl:if
    }
        CodeInjector injector = ((XSLTTraceListener)LogController.getTraceListener()).getCodeInjector();

        int construct = source.getFingerprint();
        StructuredQName qName;
        if (source instanceof LiteralResultElement) {
            construct = Location.LITERAL_RESULT_ELEMENT;
            qName = source.getNamePool().getStructuredQName(source.getNameCode());
        } else {
          qName = source.getObjectName();
        }
        Expression tracer = injector.inject(child, source.getStaticContext(), construct, qName);
        tracer.setSourceLocator(source);
        return tracer;
  }
View Full Code Here

TOP

Related Classes of client.net.sf.saxon.ce.expr.parser.CodeInjector

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.