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