As a workaround the string from rendertemplate can be stored in a variable first.

Example:

application test
page root() { output(rendertemplate(t())) }
template t() { }

Error:

[ Main | error ] No pp entry found for: (1,["ResolvedRequireKey"])
[ Main | error ] Cannot rewrite to box: 
        ResolvedRequireKey("elements#t")
[ Main | error ] No pp entry found for: (1,["ResolvedRequireKey"])
[ Main | error ] Cannot rewrite to box: 
        ResolvedRequireKey("elements#t")
[ Main | error ] No pp entry found for: (1,[[]])
[ Main | error ] Cannot rewrite to box: 
        [ResolvedRequireKey("elements#t")]
[ Main | error ] Cannot rewrite to box: 
        TemplateCall("elementsempty",[],[ResolvedRequireKey("elements#t")],TemplateBody([])){TemplateCallNumber("tcall2"),CalledTemplateArgs([]),CallToDefinedAnno,PositionAnno(""),LiftedElementsTemplateCall}
[ Main | error ] No pp entry found for: (1,["ResolvedRequireKey"])
[ Main | error ] Cannot rewrite to box: 
        ResolvedRequireKey("elements#t")
[ Main | error ] No pp entry found for: (1,["ResolvedRequireKey"])
[ Main | error ] Cannot rewrite to box: 
        ResolvedRequireKey("elements#t")
[ Main | error ] No pp entry found for: (1,[[]])
[ Main | error ] Cannot rewrite to box: 
        [ResolvedRequireKey("elements#t")]
[ Main | error ] Cannot rewrite to box: 
        TemplateCall("elementsempty",[],[ResolvedRequireKey("elements#t")],TemplateBody([])){TemplateCallNumber("tcall2"),CalledTemplateArgs([]),CallToDefinedAnno,PositionAnno(""),LiftedElementsTemplateCall}
[ Main | error ] No pp entry found for: (1,[[]])
[ Main | error ] Cannot rewrite to box: 
        [TemplateCall("elementsempty",[],[ResolvedRequireKey("elements#t")],TemplateBody([])){TemplateCallNumber("tcall2"),CalledTemplateArgs([]),CallToDefinedAnno,PositionAnno(""),LiftedElementsTemplateCall}]
[ Main | error ] Cannot rewrite to box: 
        TemplateCall("t",[],[TemplateCall("elementsempty",[],[ResolvedRequireKey("elements#t")],TemplateBody([])){TemplateCallNumber("tcall2"),CalledTemplateArgs([]),CallToDefinedAnno,PositionAnno(""),LiftedElementsTemplateCall}],TemplateBody([])){TemplateCallNumber("tcall1"),CalledTemplateArgs([]),CallToDefinedAnno,PositionAnno("")}
[ Main | error ] Cannot rewrite to box: 
        RenderTemplateFunctionCall(TemplateCall("t",[],[TemplateCall("elementsempty",[],[ResolvedRequireKey("elements#t")],TemplateBody([])){TemplateCallNumber("tcall2"),CalledTemplateArgs([]),CallToDefinedAnno,PositionAnno(""),LiftedElementsTemplateCall}],TemplateBody([])){TemplateCallNumber("tcall1"),CalledTemplateArgs([]),CallToDefinedAnno,PositionAnno("")}){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}
Main: rewriting failed, trace:
    webdslc_main_0_0
    xtc_io_wrap_5_0
    option_wrap_5_0
    xtc_io_1_0
    xtc_temp_files_1_0
    restore_always_2_0
    xtc_webdslc_0_0
    stage_1_1
    dr_scope_1_1
    log_timed_1_1
    core_to_java_servlet_0_1
    log_time_1_1
    generate_code_java_servlet_0_0
    generate_code_java_servlet_0_0
    dr_scope_1_1
    dr_scope_1_1
    dr_scope_1_1
    dr_scope_1_1
    dr_scope_1_1
    dr_scope_1_1
    dr_scope_1_1
    dr_scope_1_1
    scope_local_emit_1_1
    dr_scope_1_1
    dr_scope_1_1
    dr_scope_1_1
    log_time_1_1
    GenerateCodeJavaServlet_0_0
    log_time_1_1
    data_validation_phase_0_0
    collect_data_validation_to_java_servlet_0_0
    collect_om_1_0
    collect_om_2_0
    foldr_3_0
    collect_om_2_0
    data_validation_to_java_servlet_0_0
    control_flow_tcall_0_1
    control_flow_tcall_defined_template_0_1
    control_flow_tcall_helper_0_5
    generate_template_call_0_1
    template_call_to_java_string_0_0
    map_1_0
    pp_webdsl_to_string_0_0
    webdsl_to_abox_0_0
    ast2box_0_1
    ast2abox_0_1
    trm2abox_0_1
[ Main | critical ] Internal error: with clause failed unexpectedly in rule 'template-call-to-java-string'
           TemplateCall("outputString"{OriginalNameAnno("output")},[RenderTemplateFunctionCall(TemplateCall("t"{OriginalNameAnno("t")},[],[TemplateCall("elementsempty"{OriginalNameAnno("elementsempty")},[],[ResolvedRequireKey("elements#t")],TemplateBody([])){TemplateCallNumber("tcall2"),CalledTemplateArgs([]),CallToDefinedAnno,PositionAnno(""),LiftedElementsTemplateCall}],TemplateBody([])){TemplateCallNumber("tcall1"),CalledTemplateArgs([]),CallToDefinedAnno,PositionAnno("")}){TypeAnno(SimpleSort("String"){DefValueAnno(String(""))})}],[TemplateCall("elementsempty"{OriginalNameAnno("elementsempty")},[],[ResolvedRequireKey("elements#outputString")],TemplateBody([])){TemplateCallNumber("tcall3"),CalledTemplateArgs([]),CallToDefinedAnno,PositionAnno(""),LiftedElementsTemplateCall}],TemplateBody([])){TemplateCallNumber("tcall0"),CalledTemplateArgs([Arg("s",SimpleSort("String")){At("../.servletapp/src-webdsl-template/built-in.app",1824,17)}]),CallToDefinedAnno,PositionAnno("")}
Submitted by Christoffer Gersen on 18 December 2012 at 10:22

On 24 October 2013 at 14:37 Danny Groenewegen commented:

fixed in r5816


On 24 October 2013 at 14:37 Danny Groenewegen closed this issue.

On 24 October 2013 at 14:41 Danny Groenewegen tagged 1.3.0

Log in to post comments