Smalltalk/X WebserverDocumentation of class 'Comanche::STTTemplate': |
|
|
Class: STTTemplate (in Comanche)Inheritance:Object | +--Comanche::STTTemplate
Description:STT (Smalltalk Templates) support. Enables embedding Smalltalk code in HTML and other documents too. I'm a Smalltalk Template. My escaping sequence for embedding Smalltalk expressions is: {% %} or {%= %}. CG: I changed these to <?stt ... ?> and <?stt= ... ?> [Date:] 7 July 2002 Class protocol:defaults instance creation
Instance protocol:accessing
Examples:Try these expressions: (STTTemplate on: 'Repeating word...<?stt 10 timesRepeat: [ ?> WORD <?stt ] ?> end!') evaluateFor: nil. (STTTemplate on: 'Counting: <?stt self to: 10 do: [ :each | ?> [<?stt = each ?>] <?stt ] ?>' ) evaluateFor: 1. obsolete (non xml-compliant): (STTTemplate on: 'Repeating word...{% 10 timesRepeat: [ %} WORD {% ] %} end!') evaluateFor: nil. (STTTemplate on: 'Counting: {% self to: 10 do: [ :each | %} [{%= each %}] {% ] %}' ) evaluateFor: 1. checking documents: XML::XMLParser processDocumentInFilename:'../../goodies/webServer/data/comancheSTT/test1.stt' beforeScanDo:[:p | p validate:false] XML::XMLParser processDocumentInFilename:'../../goodies/webServer/data/comancheSTT/test4.stt' beforeScanDo:[:p | p validate:false] |
|
ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sat, 27 Apr 2024 04:56:48 GMT
|