当前位置: 首页>>代码示例>>Java>>正文


Java NodeInfo类代码示例

本文整理汇总了Java中com.icl.saxon.om.NodeInfo的典型用法代码示例。如果您正苦于以下问题:Java NodeInfo类的具体用法?Java NodeInfo怎么用?Java NodeInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


NodeInfo类属于com.icl.saxon.om包,在下文中一共展示了NodeInfo类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toplevel

import com.icl.saxon.om.NodeInfo; //导入依赖的package包/类
/**
 * Called for all top level elements
 */
public void toplevel(NodeInfo element) {
  if (!myIsInitialized) {
    myIsInitialized = true;

    final Properties properties = myController.getOutputProperties();
    final String method = properties.getProperty(OutputKeys.METHOD);
    if (method == null || "xml".equals(method) || "html".equals(method)) {
      try {
        final Emitter emitter = myController.getOutputter().getEmitter();
        final GeneralOutputter outputter = new TracingOutputter(emitter, myController.getNamePool());

        final Field fOutputter = Controller.class.getDeclaredField("currentOutputter");
        fOutputter.setAccessible(true);
        fOutputter.set(myController, outputter);
      } catch (Exception e1) {
        System.err.println("Failed to change output emitter");
        e1.printStackTrace();
      }
    }
  }

  if (TRACE) {
    StyleElement e = (StyleElement)element;
    trace("<Top-level element=\"" + e.getDisplayName() + "\" line=\"" + e.getLineNumber() +
          "\" file=\"" + e.getSystemId() + "\" precedence=\"" + e.getPrecedence() + "\"/>");
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:SaxonTraceListener.java

示例2: enterSource

import com.icl.saxon.om.NodeInfo; //导入依赖的package包/类
/**
 * Called when a node of the source tree gets processed
 */
public void enterSource(NodeHandler handler, Context context) {
  NodeInfo curr = context.getContextNodeInfo();
  final String path = Navigator.getPath(curr);
  if (TRACE) {
    trace(indent + "<Source node=\"" + path
          + "\" line=\"" + curr.getLineNumber()
          + "\" mode=\"" + getModeName(context) + "\">");
    indent += " ";
  }

  myDebugger.pushSource(new SaxonSourceFrame(myDebugger.getSourceFrame(), curr));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:SaxonTraceListener.java

示例3: enter

import com.icl.saxon.om.NodeInfo; //导入依赖的package包/类
/**
 * Called when an element of the stylesheet gets processed
 */
public void enter(NodeInfo element, Context context) {
  if (element.getNodeType() == NodeInfo.ELEMENT) {
    if (TRACE) {
      trace(indent + "<Instruction element=\"" + element.getDisplayName() + "\" line=\"" + element.getLineNumber() + "\">");
      indent += " ";
    }

    myDebugger.enter(new SaxonFrameImpl(myDebugger.getCurrentFrame(), context, (StyleElement)element));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:SaxonTraceListener.java

示例4: leave

import com.icl.saxon.om.NodeInfo; //导入依赖的package包/类
/**
   * Called after an element of the stylesheet got processed
   */
  public void leave(NodeInfo element, Context context) {
    if (element.getNodeType() == NodeInfo.ELEMENT) {
//            final int lineNumber = element.getLineNumber();
//            final String uri = element.getSystemId();

      myDebugger.leave();

      if (TRACE) {
        indent = indent.substring(0, indent.length() - 1);
        trace(indent + "</Instruction> <!-- " +
              element.getDisplayName() + " -->");
      }
    }
  }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:SaxonTraceListener.java

示例5: SaxonSourceFrame

import com.icl.saxon.om.NodeInfo; //导入依赖的package包/类
public SaxonSourceFrame(Debugger.SourceFrame prev, NodeInfo element) {
  super(prev, element);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:SaxonSourceFrame.java


注:本文中的com.icl.saxon.om.NodeInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。