當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。