[AWS] FW: problem with SLICE in Templates Parser
anders.wirzenius at wartsila.com
anders.wirzenius at wartsila.com
Thu Sep 16 19:11:52 CEST 2004
I try to resend this mail since the copy of my previous attempt didn't
show up in my mail.
Forget this if you got the mail twice.
Anders
> -----Original Message-----
> From: Wirzenius, Anders
> Sent: Thursday, September 16, 2004 4:59 PM
> To: aws at lists.act-europe.fr
> Subject: problem with SLICE in Templates Parser
>
>
> What's wrong when i get an error message from Templates Parser:
>
> Execution terminated by unhandled exception
> Exception name: TEMPLATES_PARSER.TEMPLATE_ERROR
> Message: In CIT_list.tmplt at line 22 Unknown filter SLICE.
> Call stack traceback locations: 0x454e75 0x438ad0 0x43dde3
> 0x44a949 0x440280 0x40fa5b 0x4015f3 0x401103
>
> BR
> Anders
>
>
>
> CIT_list.tmplt looks like this:
> --------------------------------------------------------------------
> <h2>Search in Service Desk on information field:</h2>
> <FORM method="post" action="/CIT-Search">
> <TABLE>
> <TR><TD></TD></TR>
> <TR>
> <TD>
> <SELECT Name="CIT" size="15">
>
> @@TABLE@@
> <OPTION VALUE="@_CIT_ID_@"
> @@IF@@ @_EXIST:CIT_SEARCH_@
> @@IF@@ @_CIT_SEARCH_@ = "SECURID"
> SELECTED
> @@END_IF@@
> >
> @_CIT_SEARCH_@
> @@IF@@ @_EXIST:CIT_NAME1_@
> (
> @@IF@@ @_SIZE:CIT_NAME1_@ < 30
> @_UPPER:CIT_NAME1_@
> @@ELSE@@
>
> ---------------- problem with SLICE--------------------------
> @_SLICE(1..30):CIT_NAME1_ at ...
> -------------------------------------------------------------
>
> @@END_IF@@
> @@END_IF@@
> @@END_IF@@
> )</OPTION>
> @@END_TABLE@@
>
> </SELECT>
> </TD>
> <TD valign="top"><input type="text" name="Text"
> size="25"></TD> <TD valign="top"><INPUT TYPE="submit"></TD>
> </TR> </TABLE> </FORM>
>
>
>
> -----------------------------------------------------------
> The program looks like this:
> -------------------------------------------------------
> with Ada.Text_IO;
> with Templates_Parser;
> procedure CIT_Test is
> CIT_ID : Templates_Parser.Vector_Tag;
> CIT_Search : Templates_Parser.Vector_Tag;
> CIT_Name1 : Templates_Parser.Vector_Tag;
> use type Templates_Parser.Vector_Tag;
> procedure Add_Row (ID, Search, Name : String) is
> begin
> CIT_ID := CIT_ID & ID;
> CIT_Search := CIT_Search & Search;
> CIT_Name1 := CIT_Name1 & Name;
> end Add_Row;
> begin
> Add_Row ("anders", "bnders", "cnders");
> Add_Row ("anders", "SECURID", "cnders");
> Add_Row ("anders", "bnders", "cnders");
>
> Ada.Text_IO.Put_Line
> (Templates_Parser.Parse
> ("CIT_list.tmplt",
> Templates_Parser.Translate_Table'
> (1 => Templates_Parser.Assoc ("CIT_ID", CIT_ID),
> 2 => Templates_Parser.Assoc ("CIT_SEARCH", CIT_Search),
> 3 => Templates_Parser.Assoc ("CIT_NAME1", CIT_Name1)
> )));
> end CIT_Test;
>
More information about the AWS
mailing list