(Node parent)
| 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 <jsp:attribute> from the enclosing node |
no test coverage detected