This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dispatcher.Register (URI => "/helloworld.tmpl", | |
| Action => Hello_World.Hello_World_Template'Access); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@-- | |
| @@-- First we define a macro. | |
| @@-- | |
| @@MACRO(F)@@ | |
| <span style="font-style: italic;">F</span><span style="font-size: 60%;">@_$1_@</span> | |
| @@END_MACRO@@ | |
| @@-- | |
| @@-- And then comes the actual HTML5 document | |
| @@-- | |
| <!DOCTYPE html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| procedure Append (T : in out Tag; Value : String); | |
| procedure Append (T : in out Tag; Value : Character); | |
| procedure Append (T : in out Tag; Value : Boolean); | |
| procedure Append (T : in out Tag; Value : Unbounded_String); | |
| procedure Append (T : in out Tag; Value : Integer); | |
| procedure Append (T : in out Tag; Value : Tag); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for i in Fibs'Range loop | |
| case i is | |
| when 0 => Fibs (i) := 0; | |
| when 1 => Fibs (i) := 1; | |
| when others => Fibs (i) := Fibs (i - 1) + Fibs (i - 2); | |
| end case; | |
| Append (Position, i); | |
| Append (Fibonacci, Fibs (i)); | |
| end loop; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| with AWS.Messages; | |
| with AWS.Templates; | |
| package body Hello_World is | |
| -- Stuff... | |
| ------------------------ | |
| -- Generate_Content -- | |
| ------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return AWS.Response.Build | |
| (Content_Type => AWS.MIME.Text_HTML, | |
| Message_Body => Parse ("templates/not_found.tmpl", Translations), | |
| Status_Code => AWS.Messages.S404); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Parse | |
| (Filename : String; | |
| Translations : Translate_Set; | |
| Cached : Boolean := False; | |
| Keep_Unknown_Tags : Boolean := False; | |
| Lazy_Tag : Dyn.Lazy_Tag_Access := Dyn.Null_Lazy_Tag; | |
| Cursor_Tag : Dyn.Cursor_Tag_Access := Dyn.Null_Cursor_Tag) | |
| return String; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| with AWS.Messages; | |
| with AWS.MIME; | |
| with AWS.Response; | |
| with AWS.Status; | |
| with AWS.Templates; | |
| package body Not_Found is | |
| -- Stuff... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Not found</title> | |
| </head> | |
| <body> | |
| <h1>Not found</h1> | |
| <p>Resource @_RESOURCE_@ not found</p> | |
| </body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git clone git://github.com/ThomasLocke/AWS_Tutorial_2.git |