Skip to main content

Table 2 TAL Language selectors

From: TAL—Template Authoring Language

Pattern Meanning
* Selects any element
E Selects any element whose name is E
EF Selects any F element descendant of an E element
E > F Selects any F element child of an E element
E: i-child Selects an E element when it is the ith child
E + F Selects any F element that is immediately preceded by an E element
E[foo] Selects any E element that has the “foo” attribute
E[foo = val] Selects any E element whose “foo” attribute has “val” as a value
E[foo = val] Selects any E element whose “foo” attribute is a list of values, and one of them is equal to “val”
E.val The same as E[class = val]
E#myId Selects any E element whose identifier is equal to “myId”