本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.makeDOMAdapter方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractTranslet.makeDOMAdapter方法的具体用法?Java AbstractTranslet.makeDOMAdapter怎么用?Java AbstractTranslet.makeDOMAdapter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet
的用法示例。
在下文中一共展示了AbstractTranslet.makeDOMAdapter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: document
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet; //导入方法依赖的package包/类
/**
* Create a DTMAxisIterator for the newdom. This is currently only
* used to create an iterator for the cached stylesheet DOM.
*
* @param newdom the cached stylesheet DOM
* @param translet the translet
* @param the main dom (should be a MultiDOM)
* @return a DTMAxisIterator from the document root
*/
private static DTMAxisIterator document(DOM newdom,
AbstractTranslet translet,
DOM dom)
throws Exception
{
DTMManager dtmManager = ((MultiDOM)dom).getDTMManager();
// Need to migrate the cached DTM to the new DTMManager
if (dtmManager != null && newdom instanceof DTM) {
((DTM)newdom).migrateTo(dtmManager);
}
translet.prepassDocument(newdom);
// Wrap the DOM object in a DOM adapter and add to multiplexer
final DOMAdapter domAdapter = translet.makeDOMAdapter(newdom);
((MultiDOM)dom).addDOMAdapter(domAdapter);
// Create index for any key elements
translet.buildKeys(domAdapter, null, null,
newdom.getDocument());
// Return a singleton iterator containing the root node
return new SingletonIterator(newdom.getDocument(), true);
}