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