// TODO more error checking
if (contentDescription != null) {
if (bodyContent.equals(BodyContent.JSP) && contentDescription.contentType().length() > 0) {
throw new IllegalArgumentException(
"contentType " + contentDescription.contentType() + " for bodyContent JSP not allowed!");
} else if (bodyContent.equals(BodyContent.TAGDEPENDENT) && contentDescription.contentType().length() == 0) {
throw new IllegalArgumentException("contentType should set for tagdependent bodyContent");
}
}
addLeafTextElement(bodyContent.toString(), "body-content", tagElement, document);
addDescription(decl, tagElement, document, deprecated);