| @@ 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, '>'; |
|
| @@ 442-467 (lines=26) @@ | ||
| 439 | } |
|
| 440 | ||
| 441 | // end |
|
| 442 | if ($ql = count($q)) { |
|
| 443 | $p = array_pop($q); |
|
| 444 | $q[] = $p; |
|
| 445 | if (isset($cS[$p])) { |
|
| 446 | $ok = $cS[$p]; |
|
| 447 | } elseif (isset($cI[$p])) { |
|
| 448 | $ok = $eI; |
|
| 449 | $cI['del'] = 1; |
|
| 450 | $cI['ins'] = 1; |
|
| 451 | } elseif (isset($cF[$p])) { |
|
| 452 | $ok = $eF; |
|
| 453 | unset($cI['del'], $cI['ins']); |
|
| 454 | } elseif (isset($cB[$p])) { |
|
| 455 | $ok = $eB; |
|
| 456 | unset($cI['del'], $cI['ins']); |
|
| 457 | } |
|
| 458 | if (isset($cO[$p])) { |
|
| 459 | $ok = $ok + $cO[$p]; |
|
| 460 | } |
|
| 461 | if (isset($cN[$p])) { |
|
| 462 | $ok = array_diff_assoc($ok, $cN[$p]); |
|
| 463 | } |
|
| 464 | } else { |
|
| 465 | $ok = $inOk; |
|
| 466 | unset($cI['del'], $cI['ins']); |
|
| 467 | } |
|
| 468 | if (isset($e) && ($do == 1 or (isset($ok['#pcdata']) && ($do == 3 or $do == 5)))) { |
|
| 469 | echo '<', $s, $e, $a, '>'; |
|
| 470 | } |
|