|
@@ 51-56 (lines=6) @@
|
| 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) $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); |
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
// do local transformations only applicable to this element (pre) |
| 59 |
|
// ex. <p align="right"> to <p style="text-align:right;"> |
|
@@ 60-65 (lines=6) @@
|
| 57 |
|
|
| 58 |
|
// do local transformations only applicable to this element (pre) |
| 59 |
|
// ex. <p align="right"> to <p style="text-align:right;"> |
| 60 |
|
foreach ($definition->info[$token->name]->attr_transform_pre as $transform) { |
| 61 |
|
$attr = $transform->transform($o = $attr, $config, $context); |
| 62 |
|
if ($e) { |
| 63 |
|
if ($attr != $o) $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); |
| 64 |
|
} |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
// create alias to this element's attribute definition array, see |
| 68 |
|
// also $d_defs (global attribute definition array) |
|
@@ 137-142 (lines=6) @@
|
| 134 |
|
// post transforms |
| 135 |
|
|
| 136 |
|
// global (error reporting untested) |
| 137 |
|
foreach ($definition->info_attr_transform_post as $transform) { |
| 138 |
|
$attr = $transform->transform($o = $attr, $config, $context); |
| 139 |
|
if ($e) { |
| 140 |
|
if ($attr != $o) $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); |
| 141 |
|
} |
| 142 |
|
} |
| 143 |
|
|
| 144 |
|
// local (error reporting untested) |
| 145 |
|
foreach ($definition->info[$token->name]->attr_transform_post as $transform) { |
|
@@ 145-150 (lines=6) @@
|
| 142 |
|
} |
| 143 |
|
|
| 144 |
|
// local (error reporting untested) |
| 145 |
|
foreach ($definition->info[$token->name]->attr_transform_post as $transform) { |
| 146 |
|
$attr = $transform->transform($o = $attr, $config, $context); |
| 147 |
|
if ($e) { |
| 148 |
|
if ($attr != $o) $e->send(E_NOTICE, 'AttrValidator: Attributes transformed', $o, $attr); |
| 149 |
|
} |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
$token->attr = $attr; |
| 153 |
|
|