|
@@ 51-58 (lines=8) @@
|
| 48 |
|
|
| 49 |
|
// do global transformations (pre) |
| 50 |
|
// nothing currently utilizes this |
| 51 |
|
foreach ($definition->info_attr_transform_pre as $transform) { |
| 52 |
|
$attr = $transform->transform($o = $attr, $config, $context); |
| 53 |
|
if ($e) { |
| 54 |
|
if ($attr != $o) { |
| 55 |
|
$e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); |
| 56 |
|
} |
| 57 |
|
} |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
// do local transformations only applicable to this element (pre) |
| 61 |
|
// ex. <p align="right"> to <p style="text-align:right;"> |
|
@@ 62-69 (lines=8) @@
|
| 59 |
|
|
| 60 |
|
// do local transformations only applicable to this element (pre) |
| 61 |
|
// ex. <p align="right"> to <p style="text-align:right;"> |
| 62 |
|
foreach ($definition->info[$token->name]->attr_transform_pre as $transform) { |
| 63 |
|
$attr = $transform->transform($o = $attr, $config, $context); |
| 64 |
|
if ($e) { |
| 65 |
|
if ($attr != $o) { |
| 66 |
|
$e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); |
| 67 |
|
} |
| 68 |
|
} |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
// create alias to this element's attribute definition array, see |
| 72 |
|
// also $d_defs (global attribute definition array) |
|
@@ 147-154 (lines=8) @@
|
| 144 |
|
// post transforms |
| 145 |
|
|
| 146 |
|
// global (error reporting untested) |
| 147 |
|
foreach ($definition->info_attr_transform_post as $transform) { |
| 148 |
|
$attr = $transform->transform($o = $attr, $config, $context); |
| 149 |
|
if ($e) { |
| 150 |
|
if ($attr != $o) { |
| 151 |
|
$e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); |
| 152 |
|
} |
| 153 |
|
} |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
// local (error reporting untested) |
| 157 |
|
foreach ($definition->info[$token->name]->attr_transform_post as $transform) { |
|
@@ 157-164 (lines=8) @@
|
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
// local (error reporting untested) |
| 157 |
|
foreach ($definition->info[$token->name]->attr_transform_post as $transform) { |
| 158 |
|
$attr = $transform->transform($o = $attr, $config, $context); |
| 159 |
|
if ($e) { |
| 160 |
|
if ($attr != $o) { |
| 161 |
|
$e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); |
| 162 |
|
} |
| 163 |
|
} |
| 164 |
|
} |
| 165 |
|
|
| 166 |
|
$token->attr = $attr; |
| 167 |
|
|