Prev | Current Page 503 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


Loop expressions are different in the two implementations and explained in detail later in
this chapter.
All the expression results are filtered and (X)HTML reserved characters are automatically
converted in their corresponding entities (for example, the < character is converted to & lt; ).
??‘
??‘
??‘
??‘
??‘
??‘
??‘
Part II: Server Side, JavaScript, and Flash; Oh My!
262
Attr Expressions
As already discussed, Templo has been seen to work expressly with (X)HTML syntax; this means that
certain expressions are only available and useful when associated to tags. The attr expression is one of
these cases and, as its name suggests, it is used to add an optional attribute in an element.
< a ::attr href ???mailto:??™+item.email:: > ::item.email:: < /a >
The attr expression is followed by a keyword that is used as the attribute name, in the preceding
example href , and by another expression that is used as the attribute value, in the example a string
concatenation between a constant value and the email field of the item object.


Pages:
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515