本文整理汇总了Java中net.sf.saxon.event.ProxyReceiver类的典型用法代码示例。如果您正苦于以下问题:Java ProxyReceiver类的具体用法?Java ProxyReceiver怎么用?Java ProxyReceiver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProxyReceiver类属于net.sf.saxon.event包,在下文中一共展示了ProxyReceiver类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import net.sf.saxon.event.ProxyReceiver; //导入依赖的package包/类
public static boolean init(Transformer transformer, final LocalDebugger dbg) {
if (transformer instanceof Controller) {
System.out.println("SAXON 9");
final Controller controller = (Controller)transformer;
((Saxon9TraceListener)controller.getConfiguration().getTraceListener()).setDebugger(dbg);
controller.getConfiguration().setLineNumbering(true);
controller.getConfiguration().setCompileWithTracing(true);
controller.getConfiguration().setMultiThreading(false);
controller.getConfiguration().setSerializerFactory(new SerializerFactory(controller.getConfiguration()) {
@Override
protected Receiver createXMLSerializer(Emitter emitter,
Properties props,
PipelineConfiguration pipe,
CharacterMapExpander characterMapExpander,
ProxyReceiver normalizer) throws XPathException {
return super.createXMLSerializer(emitter, props, pipe, characterMapExpander, normalizer);
}
@Override
protected Emitter newXMLEmitter() {
return new TracingOutputter(dbg.getEventQueue(), super.newXMLEmitter());
}
});
controller.getConfiguration().setDebugger(new Debugger() {
public SlotManager makeSlotManager() {
return new SlotManager() {
@Override
public int allocateSlotNumber(StructuredQName qName) {
System.out.println("qName = " + qName);
return super.allocateSlotNumber(qName);
}
};
}
});
return true;
}
return false;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:39,代码来源:Saxon9Support.java
示例2: parse
import net.sf.saxon.event.ProxyReceiver; //导入依赖的package包/类
@Override
public void parse(InputSource input) throws IOException, SAXException {
final ContentHandlerProxy chp = new ContentHandlerProxy();
chp.setLexicalHandler(lexicalHandler);
chp.setUnderlyingContentHandler(handler);
this.source.addFilter(new FilterFactory() {
@Override
public ProxyReceiver makeFilter(Receiver arg0) {
return new ContentHandlerProxyReceiver(chp, arg0);
}
});
try {
config.buildDocument(source);
} catch (XPathException e) {
throw new SAXException(e);
}
}
开发者ID:kenweezy,项目名称:teiid,代码行数:19,代码来源:StreamingUtils.java
示例3: AbstractSdcctCdataXmlFilter
import net.sf.saxon.event.ProxyReceiver; //导入依赖的package包/类
protected AbstractSdcctCdataXmlFilter(Receiver nextReceiver) {
super(nextReceiver);
Receiver receiver = this.nextReceiver;
while (!(receiver instanceof ReceiverToXMLStreamWriter)) {
receiver = ((receiver instanceof ComplexContentOutputter)
? ((ComplexContentOutputter) receiver).getReceiver() : ((ProxyReceiver) receiver).getUnderlyingReceiver());
}
this.writer = Stax2WriterAdapter.wrapIfNecessary(((ReceiverToXMLStreamWriter) receiver).getXMLStreamWriter());
}
开发者ID:esacinc,项目名称:sdcct,代码行数:13,代码来源:AbstractSdcctCdataXmlFilter.java
注:本文中的net.sf.saxon.event.ProxyReceiver类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论