XmlTag rootTag = jspFile.getRootTag();
String prefix = rootTag.getPrefixByNamespace(StrutsConstants.TAGLIB_STRUTS_UI_URI);
if (StringUtil.isEmpty(prefix)) {
XmlNamespaceHelper extension = XmlNamespaceHelper.getHelper(jspFile);
prefix = ExtendedTagInsertHandler.suggestPrefix(jspFile, StrutsConstants.TAGLIB_STRUTS_UI_URI);
XmlNamespaceHelper.Runner<String, IncorrectOperationException> after =
new XmlNamespaceHelper.Runner<String, IncorrectOperationException>() {
@Override
public void run(String param) throws IncorrectOperationException {
wrapValue(param, value, url, inline);
}
};
extension.insertNamespaceDeclaration(jspFile, null, Collections.singleton(StrutsConstants.TAGLIB_STRUTS_UI_URI), prefix, after);
}
else {
wrapValue(prefix, value, url, inline);
}
}