(Node parent)
| 493 | * '>' S? ETag ) ) | ( 'variable' VariableDirectiveAttrList S? ( '/>' | ( '>' S? ETag ) ) ) | <TRANSLATION_ERROR> |
| 494 | */ |
| 495 | private void parseXMLDirective(Node parent) throws JasperException { |
| 496 | reader.skipSpaces(); |
| 497 | |
| 498 | String eTag = null; |
| 499 | if (reader.matches("page")) { |
| 500 | eTag = "jsp:directive.page"; |
| 501 | if (isTagFile) { |
| 502 | err.jspError(reader.mark(), "jsp.error.directive.istagfile", "<" + eTag); |
| 503 | } |
| 504 | parsePageDirective(parent); |
| 505 | } else if (reader.matches("include")) { |
| 506 | eTag = "jsp:directive.include"; |
| 507 | parseIncludeDirective(parent); |
| 508 | } else if (reader.matches("tag")) { |
| 509 | eTag = "jsp:directive.tag"; |
| 510 | if (!isTagFile) { |
| 511 | err.jspError(reader.mark(), "jsp.error.directive.isnottagfile", "<" + eTag); |
| 512 | } |
| 513 | parseTagDirective(parent); |
| 514 | } else if (reader.matches("attribute")) { |
| 515 | eTag = "jsp:directive.attribute"; |
| 516 | if (!isTagFile) { |
| 517 | err.jspError(reader.mark(), "jsp.error.directive.isnottagfile", "<" + eTag); |
| 518 | } |
| 519 | parseAttributeDirective(parent); |
| 520 | } else if (reader.matches("variable")) { |
| 521 | eTag = "jsp:directive.variable"; |
| 522 | if (!isTagFile) { |
| 523 | err.jspError(reader.mark(), "jsp.error.directive.isnottagfile", "<" + eTag); |
| 524 | } |
| 525 | parseVariableDirective(parent); |
| 526 | } else { |
| 527 | err.jspError(reader.mark(), "jsp.error.invalid.directive"); |
| 528 | } |
| 529 | |
| 530 | reader.skipSpaces(); |
| 531 | if (reader.matches(">")) { |
| 532 | reader.skipSpaces(); |
| 533 | if (!reader.matchesETag(eTag)) { |
| 534 | err.jspError(start, "jsp.error.unterminated", "<" + eTag); |
| 535 | } |
| 536 | } else if (!reader.matches("/>")) { |
| 537 | err.jspError(start, "jsp.error.unterminated", "<" + eTag); |
| 538 | } |
| 539 | } |
| 540 | |
| 541 | /* |
| 542 | * Parses a tag directive with the following syntax: PageDirective ::= ( S Attribute)* |
no test coverage detected