本文整理汇总了Java中org.apache.xalan.transformer.TransformerImpl.pushCurrentTemplateRuleIsNull方法的典型用法代码示例。如果您正苦于以下问题:Java TransformerImpl.pushCurrentTemplateRuleIsNull方法的具体用法?Java TransformerImpl.pushCurrentTemplateRuleIsNull怎么用?Java TransformerImpl.pushCurrentTemplateRuleIsNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.xalan.transformer.TransformerImpl
的用法示例。
在下文中一共展示了TransformerImpl.pushCurrentTemplateRuleIsNull方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.apache.xalan.transformer.TransformerImpl; //导入方法依赖的package包/类
/**
* Apply the context node to the matching templates.
* @see <a href="http://www.w3.org/TR/xslt#section-Applying-Template-Rules">section-Applying-Template-Rules in XSLT Specification</a>
*
* @param transformer non-null reference to the the current transform-time state.
*
* @throws TransformerException
*/
public void execute(TransformerImpl transformer) throws TransformerException
{
transformer.pushCurrentTemplateRuleIsNull(false);
boolean pushMode = false;
try
{
// %REVIEW% Do we need this check??
// if (null != sourceNode)
// {
// boolean needToTurnOffInfiniteLoopCheck = false;
QName mode = transformer.getMode();
if (!m_isDefaultTemplate)
{
if (((null == mode) && (null != m_mode))
|| ((null != mode) &&!mode.equals(m_mode)))
{
pushMode = true;
transformer.pushMode(m_mode);
}
}
transformSelectedNodes(transformer);
}
finally
{
if (pushMode)
transformer.popMode();
transformer.popCurrentTemplateRuleIsNull();
}
}
示例2: execute
import org.apache.xalan.transformer.TransformerImpl; //导入方法依赖的package包/类
/**
* Execute the xsl:for-each transformation
*
* @param transformer non-null reference to the the current transform-time state.
*
* @throws TransformerException
*/
public void execute(TransformerImpl transformer) throws TransformerException
{
transformer.pushCurrentTemplateRuleIsNull(true);
try
{
transformSelectedNodes(transformer);
}
finally
{
transformer.popCurrentTemplateRuleIsNull();
}
}