本文整理汇总了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() + "\"/>");
}
}
示例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));
}
示例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));
}
}
示例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() + " -->");
}
}
}
示例5: SaxonSourceFrame
import com.icl.saxon.om.NodeInfo; //导入依赖的package包/类
public SaxonSourceFrame(Debugger.SourceFrame prev, NodeInfo element) {
super(prev, element);
}