private static void noELnorEmpty(String nm, String val, Item item) throws UiException { if (isEmpty(val)) throw new UiException(message(nm + " cannot be empty", item)); noEL(nm, val, item); }
pgdef.setContentType(val); } else if ("docType".equals(nm)) { pgdef.setDocType(isEmpty(val) ? "" : "<!DOCTYPE " + val + '>'); } else if ("xml".equals(nm)) { noEmpty("xml", val, pi);
if (breakLine && (o instanceof Text) && isEmpty(label.trim())) { if (isEmpty(label)) continue; if (isEmpty(trimLabel)) continue; throw new UiException(message("Only <zk> can be used in <zk switch>", (Item) o)); if (isXHTML && items.size() <= 1 && isEmpty(trimLabel.trim())) { continue; //don't create Text } else if (isEmpty(trimLabel) && (pi != null && !pi.isBlankPreserved() && !isNativeText(pi))) continue; //Ignore blank text if no need to preserved else if (isEmpty(label.trim()) && !isAllBlankPreserved) continue; if (!isXHTML && (o instanceof Text) && isEmpty(label.trim())) breakLine = true; new TextInfo(parent, isEmpty(trimLabel) ? " " : label); if (!isEmpty(trimLabel)) if (textAsBuffer != null) //implies pi == parent } else { // shadow element shouldn't support empty LabelInfo if (parent instanceof ShadowInfo) { if (isEmpty(trimLabel)) continue; //ignore
} else if ("variable-resolver".equals(target) || "function-mapper".equals(target)) { final String clsnm = params.remove("class"); if (isEmpty(clsnm)) throw new UiException(message("The class attribute is required", pi));
while (root != null && !(root instanceof Element)) { if (root instanceof Text) { if (!isEmpty(((Text) root).getText().trim())) break;