| @@ 281-306 (lines=26) @@ | ||
| 278 | ||
| 279 | for ($i = -1, $ci = count($t); ++$i < $ci;) { |
|
| 280 | // allowed $ok in parent $p |
|
| 281 | if ($ql = count($q)) { |
|
| 282 | $p = array_pop($q); |
|
| 283 | $q[] = $p; |
|
| 284 | if (isset($cS[$p])) { |
|
| 285 | $ok = $cS[$p]; |
|
| 286 | } elseif (isset($cI[$p])) { |
|
| 287 | $ok = $eI; |
|
| 288 | $cI['del'] = 1; |
|
| 289 | $cI['ins'] = 1; |
|
| 290 | } elseif (isset($cF[$p])) { |
|
| 291 | $ok = $eF; |
|
| 292 | unset($cI['del'], $cI['ins']); |
|
| 293 | } elseif (isset($cB[$p])) { |
|
| 294 | $ok = $eB; |
|
| 295 | unset($cI['del'], $cI['ins']); |
|
| 296 | } |
|
| 297 | if (isset($cO[$p])) { |
|
| 298 | $ok = $ok + $cO[$p]; |
|
| 299 | } |
|
| 300 | if (isset($cN[$p])) { |
|
| 301 | $ok = array_diff_assoc($ok, $cN[$p]); |
|
| 302 | } |
|
| 303 | } else { |
|
| 304 | $ok = $inOk; |
|
| 305 | unset($cI['del'], $cI['ins']); |
|
| 306 | } |
|
| 307 | // bad tags, & ele content |
|
| 308 | if (isset($e) && ($do == 1 or (isset($ok['#pcdata']) && ($do == 3 or $do == 5)))) { |
|
| 309 | echo '<', $s, $e, $a, '>'; |
|
| @@ 440-465 (lines=26) @@ | ||
| 437 | } |
|
| 438 | ||
| 439 | // end |
|
| 440 | if ($ql = count($q)) { |
|
| 441 | $p = array_pop($q); |
|
| 442 | $q[] = $p; |
|
| 443 | if (isset($cS[$p])) { |
|
| 444 | $ok = $cS[$p]; |
|
| 445 | } elseif (isset($cI[$p])) { |
|
| 446 | $ok = $eI; |
|
| 447 | $cI['del'] = 1; |
|
| 448 | $cI['ins'] = 1; |
|
| 449 | } elseif (isset($cF[$p])) { |
|
| 450 | $ok = $eF; |
|
| 451 | unset($cI['del'], $cI['ins']); |
|
| 452 | } elseif (isset($cB[$p])) { |
|
| 453 | $ok = $eB; |
|
| 454 | unset($cI['del'], $cI['ins']); |
|
| 455 | } |
|
| 456 | if (isset($cO[$p])) { |
|
| 457 | $ok = $ok + $cO[$p]; |
|
| 458 | } |
|
| 459 | if (isset($cN[$p])) { |
|
| 460 | $ok = array_diff_assoc($ok, $cN[$p]); |
|
| 461 | } |
|
| 462 | } else { |
|
| 463 | $ok = $inOk; |
|
| 464 | unset($cI['del'], $cI['ins']); |
|
| 465 | } |
|
| 466 | if (isset($e) && ($do == 1 or (isset($ok['#pcdata']) && ($do == 3 or $do == 5)))) { |
|
| 467 | echo '<', $s, $e, $a, '>'; |
|
| 468 | } |
|