bundles/org.apache.jasper.glassfish/src/org/apache/jasper/compiler/Parser.java
private void parseNamedAttributes(Node parent) throws JasperException {
        do {
            Mark start = reader.mark();
            Attributes attrs = parseAttributes();
            if (attrs == null || attrs.getValue("name") == null) {
                err.jspError(start, "jsp.error.jspAttribute.missing.name");
            }
            Node.NamedAttribute namedAttributeNode =
                new Node.NamedAttribute( attrs, start, parent );

            reader.skipSpaces();
	    if (!reader.matches("/>")) {
		if (!reader.matches(">")) {
		    err.jspError(start, "jsp.error.unterminated",
				 "&lt;jsp:attribute");
		}
                if (namedAttributeNode.isTrim()) {
                    reader.skipSpaces();
                }
                parseBody(namedAttributeNode, "jsp:attribute", 
			  getAttributeBodyType(parent,
					       attrs.getValue("name")));
                if (namedAttributeNode.isTrim()) {
                    Node.Nodes subElems = namedAttributeNode.getBody();
		    if (subElems != null) {
			Node lastNode = subElems.getNode(subElems.size() - 1);
			if (lastNode instanceof Node.TemplateText) {
			    ((Node.TemplateText)lastNode).rtrim();
			}
		    }
                }
            }
            reader.skipSpaces();
        } while( reader.matches( "<jsp:attribute" ) );
    }
private void parseNamedAttributes(Node parent) throws JasperException {
        do {
            Mark start = reader.mark();
            Attributes attrs = parseAttributes();
            if (attrs == null || attrs.getValue("name") == null) {
                err.jspError(start, "jsp.error.jspAttribute.missing.name");
            }
            Node.NamedAttribute namedAttributeNode =
                new Node.NamedAttribute( attrs, start, parent );

            reader.skipSpaces();
	    if (!reader.matches("/>")) {
		if (!reader.matches(">")) {
		    err.jspError(start, "jsp.error.unterminated",
				 "&lt;jsp:attribute");
		}
                if (namedAttributeNode.isTrim()) {
                    reader.skipSpaces();
                }
                parseBody(namedAttributeNode, "jsp:attribute", 
			  getAttributeBodyType(parent,
					       attrs.getValue("name")));
                if (namedAttributeNode.isTrim()) {
                    Node.Nodes subElems = namedAttributeNode.getBody();
		    if (subElems != null) {
			Node lastNode = subElems.getNode(subElems.size() - 1);
			if (lastNode instanceof Node.TemplateText) {
			    ((Node.TemplateText)lastNode).rtrim();
			}
		    }
                }
            }
            reader.skipSpaces();
        } while( reader.matches( "<jsp:attribute" ) );
    }
private void parseNamedAttributes ( Node parent ) throws JasperException { do { Mark start = reader . mark ( ) ; Attributes attrs = parseAttributes ( ) ; if ( attrs == null || attrs . getValue ( "name" ) == null ) { err . jspError ( start , "jsp.error.jspAttribute.missing.name" ) ; } Node . NamedAttribute namedAttributeNode = new Node . NamedAttribute ( attrs , start , parent ) ; reader . skipSpaces ( ) ; if ( ! reader . matches ( "/>" ) ) { if ( ! reader . matches ( ">" ) ) { err . jspError ( start , "jsp.error.unterminated" , "&lt;jsp:attribute" ) ; } if ( namedAttributeNode . isTrim ( ) ) { reader . skipSpaces ( ) ; } parseBody ( namedAttributeNode , "jsp:attribute" , getAttributeBodyType ( parent , attrs . getValue ( "name" ) ) ) ; if ( namedAttributeNode . isTrim ( ) ) { Node . Nodes subElems = namedAttributeNode . getBody ( ) ; if ( subElems != null ) { Node lastNode = subElems . getNode ( subElems . size ( ) - 1 ) ; if ( lastNode instanceof Node . TemplateText ) { ( ( Node . TemplateText ) lastNode ) . rtrim ( ) ; } } } } reader . skipSpaces ( ) ; } while ( reader . matches ( "<jsp:attribute" ) ) ; }
/*
Parses named attributes.
/ * Parses named attributes .