return false;
}
TagInfo tagInfo = tagLibInfo.getTag(shortTagName);
if (tagInfo == null)
{
throw new JspToJavaException(start, "Bad tag : "+shortTagName, prefix);
}
// EmptyElemTag ::= '<' Name ( #S Attribute )* S? '/>'
// or Stag ::= '<' Name ( #S Attribute)* S? '>'
Attributes attrs = parseAttributes();
reader.skipSpaces();
if (reader.matches("/>")) {
// EmptyElemTag ::= '<' Name ( S Attribute )* S? '/>'#
new Node.CustomTag(attrs, start, tagName, prefix, shortTagName,
tagInfo, parent);
return true;
}
if (!reader.matches(">"))
{
throw new JspToJavaException(start, "Unterminated tag");
}
// ActionElement ::= Stag #Body Etag
// Looking for a body, it still can be empty; but if there is a
// a tag body, its syntax would be dependent on the type of
// body content declared in TLD.
String bc = tagInfo.getBodyContent();
Node tagNode = new Node.CustomTag(attrs, start, tagName, prefix,
shortTagName, tagInfo, parent);
// There are 3 body content types: empty, jsp, or tag-dependent.
if (bc.equalsIgnoreCase(TagInfo.BODY_CONTENT_EMPTY))
{
if (!reader.matchesETag(tagName))
{
throw new JspToJavaException(start, "empty body content is nonempty");
}
}
else if (bc.equalsIgnoreCase(TagInfo.BODY_CONTENT_TAG_DEPENDENT))
{
// parse the body as text
parseBodyText(tagNode, tagName);
}
else if (bc.equalsIgnoreCase(TagInfo.BODY_CONTENT_JSP))
{
// parse body as JSP page
parseBody(tagNode, tagName);
}
else
{
throw new JspToJavaException(start, "Bad content type");
}
return true;
}