MCPcopy Index your code
hub / github.com/apache/tomcat / parseNamedAttributes

Method parseNamedAttributes

java/org/apache/jasper/compiler/Parser.java:1507–1534  ·  view source on GitHub ↗
(Node parent)

Source from the content-addressed store, hash-verified

1505 * Parses named attributes.
1506 */
1507 private void parseNamedAttributes(Node parent) throws JasperException {
1508 do {
1509 Mark start = reader.mark();
1510 Attributes attrs = parseAttributes();
1511 Node.NamedAttribute namedAttributeNode = new Node.NamedAttribute(attrs, start, parent);
1512
1513 reader.skipSpaces();
1514 if (!reader.matches("/>")) {
1515 if (!reader.matches(">")) {
1516 err.jspError(start, "jsp.error.unterminated", "<jsp:attribute");
1517 }
1518 if (namedAttributeNode.isTrim()) {
1519 reader.skipSpaces();
1520 }
1521 parseBody(namedAttributeNode, "jsp:attribute", getAttributeBodyType(parent, attrs.getValue("name")));
1522 if (namedAttributeNode.isTrim()) {
1523 Node.Nodes subElems = namedAttributeNode.getBody();
1524 if (subElems != null) {
1525 Node lastNode = subElems.getNode(subElems.size() - 1);
1526 if (lastNode instanceof Node.TemplateText) {
1527 ((Node.TemplateText) lastNode).rtrim();
1528 }
1529 }
1530 }
1531 }
1532 reader.skipSpaces();
1533 } while (reader.matches("<jsp:attribute"));
1534 }
1535
1536 /**
1537 * Determine the body type of &lt;jsp:attribute> from the enclosing node

Callers 2

parseEmptyBodyMethod · 0.95

Calls 13

parseAttributesMethod · 0.95
isTrimMethod · 0.95
parseBodyMethod · 0.95
getAttributeBodyTypeMethod · 0.95
rtrimMethod · 0.80
matchesMethod · 0.65
jspErrorMethod · 0.65
getValueMethod · 0.65
markMethod · 0.45
skipSpacesMethod · 0.45
getBodyMethod · 0.45
getNodeMethod · 0.45

Tested by

no test coverage detected