当前位置: 首页>>代码示例>>C++>>正文


C++ txExecutionState::pushTemplateRule方法代码示例

本文整理汇总了C++中txExecutionState::pushTemplateRule方法的典型用法代码示例。如果您正苦于以下问题:C++ txExecutionState::pushTemplateRule方法的具体用法?C++ txExecutionState::pushTemplateRule怎么用?C++ txExecutionState::pushTemplateRule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在txExecutionState的用法示例。


在下文中一共展示了txExecutionState::pushTemplateRule方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: mode

nsresult
txApplyImportsStart::execute(txExecutionState& aEs)
{
    txExecutionState::TemplateRule* rule = aEs.getCurrentTemplateRule();
    // The frame is set to null when there is no current template rule, or
    // when the current template rule is a default template. However this
    // instruction isn't used in default templates.
    if (!rule->mFrame) {
        // XXX ErrorReport: apply-imports instantiated without a current rule
        return NS_ERROR_XSLT_EXECUTION_FAILURE;
    }

    nsresult rv = aEs.pushParamMap(rule->mParams);
    NS_ENSURE_SUCCESS(rv, rv);

    txStylesheet::ImportFrame* frame = 0;
    txExpandedName mode(rule->mModeNsId, rule->mModeLocalName);
    txInstruction* templ =
        aEs.mStylesheet->findTemplate(aEs.getEvalContext()->getContextNode(),
                                      mode, &aEs, rule->mFrame, &frame);

    aEs.pushTemplateRule(frame, mode, rule->mParams);

    return aEs.runTemplate(templ);
}
开发者ID:benfrancis,项目名称:gecko-tablet,代码行数:25,代码来源:txInstructions.cpp

示例2:

nsresult
txApplyTemplates::execute(txExecutionState& aEs)
{
    txStylesheet::ImportFrame* frame = 0;
    txInstruction* templ =
        aEs.mStylesheet->findTemplate(aEs.getEvalContext()->getContextNode(),
                                      mMode, &aEs, nullptr, &frame);

    aEs.pushTemplateRule(frame, mMode, aEs.mTemplateParams);

    return aEs.runTemplate(templ);
}
开发者ID:benfrancis,项目名称:gecko-tablet,代码行数:12,代码来源:txInstructions.cpp

示例3: txExpandedName

nsresult
txPushNullTemplateRule::execute(txExecutionState& aEs)
{
    aEs.pushTemplateRule(nullptr, txExpandedName(), nullptr);
    return NS_OK;
}
开发者ID:benfrancis,项目名称:gecko-tablet,代码行数:6,代码来源:txInstructions.cpp

示例4: txExpandedName

nsresult
txPushNullTemplateRule::execute(txExecutionState& aEs)
{
    return aEs.pushTemplateRule(nsnull, txExpandedName(), nsnull);
}
开发者ID:EdgarChen,项目名称:mozilla-cvs-history,代码行数:5,代码来源:txInstructions.cpp


注:本文中的txExecutionState::pushTemplateRule方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。