{
TableTag tableTag = (TableTag) findAncestorWithClass(this, TableTag.class);
if (tableTag == null)
{
throw new TagStructureException(getClass(), "caption", "table"); //$NON-NLS-1$ //$NON-NLS-2$
}
MediaTypeEnum currentMediaType = (MediaTypeEnum) this.pageContext
.findAttribute(TableTag.PAGE_ATTRIBUTE_MEDIA);
if (currentMediaType != null && !MediaUtil.availableForMedia(this, currentMediaType))