(Node parent, String tag)
| 867 | * EmptyBody ::= '/>' | ( '>' ETag ) | ( '>' S? '<jsp:attribute' NamedAttributes ETag ) |
| 868 | */ |
| 869 | private void parseEmptyBody(Node parent, String tag) throws JasperException { |
| 870 | if (reader.matches("/>")) { |
| 871 | // Done |
| 872 | } else if (reader.matches(">")) { |
| 873 | if (reader.matchesETag(tag)) { |
| 874 | // Done |
| 875 | } else if (reader.matchesOptionalSpacesFollowedBy("<jsp:attribute")) { |
| 876 | // Parse the one or more named attribute nodes |
| 877 | parseNamedAttributes(parent); |
| 878 | if (!reader.matchesETag(tag)) { |
| 879 | // Body not allowed |
| 880 | err.jspError(reader.mark(), "jsp.error.jspbody.emptybody.only", "<" + tag); |
| 881 | } |
| 882 | } else { |
| 883 | err.jspError(reader.mark(), "jsp.error.jspbody.emptybody.only", "<" + tag); |
| 884 | } |
| 885 | } else { |
| 886 | err.jspError(reader.mark(), "jsp.error.unterminated", "<" + tag); |
| 887 | } |
| 888 | } |
| 889 | |
| 890 | /* |
| 891 | * For UseBean: StdActionContent ::= Attributes OptionalBody |
no test coverage detected