else if (HtmlHeaderResolver.HEADER_ITEMS.equalsIgnoreCase(tag.getName()) &&
tag.getNamespace().equalsIgnoreCase(getWicketNamespace()))
{
if (foundHeaderItemsTag)
{
throw new MarkupException(new MarkupStream(markup),
"More than one <wicket:header-items/> detected in the <head> element. Only one is allowed.");
}
else if (foundClosingHead)
{
throw new MarkupException(new MarkupStream(markup),
"Detected <wicket:header-items/> after the closing </head> element.");
}
foundHeaderItemsTag = true;
tag.setId(HEADER_ID);
tag.setAutoComponentTag(true);
tag.setModified(true);
return tag;
}
else if (BODY.equalsIgnoreCase(tag.getName()) && (tag.getNamespace() == null))
{
// WICKET-4511: We found <body> inside <head> tag. Markup is not valid!
if (foundHead && !foundClosingHead)
{
throw new MarkupException(new MarkupStream(markup),
"Invalid page markup. Tag <BODY> found inside <HEAD>");
}
// We found <body>
if (foundHead == false)