<html> @0 <head> @0.0 (IMPLICIT) <body> @0.1 (IMPLICIT) <table supply="_aref::load_data"> @0.1.0 <tr iterator="supply.Next"> @0.1.0.0 <th> @0.1.0.0.0 "name" <th> @0.1.0.0.1 "age" <th> @0.1.0.0.2 "weight" <td builder="_text::iterator.name"> @0.1.0.0.3 <td builder="_text::iterator.age"> @0.1.0.0.4 <td builder="_text::iterator.weight"> @0.1.0.0.5
It would be possible to tie each identifier to an anonymous subroutine:
for pure Perl and pure HTML templating (ie, absolutely no foreign elements in the HTML.my %dynamic_html = ( '@0.1.0.0.5' => sub { my $node = shift; $node->splice_content(0,1,'ne +w text'} }
However, the problem would be that the mapping would have to change each time that the HTML changed the tree-numbering.
|
|---|