for (int i = 0; attrs != null && i < attrs.length; i++) {
String attrStr = null;
if (attrs[i].isNamedAttribute()) {
+ if (attrs[i].getNamedAttributeNode().isOmit()) {
+ // Skip this attribute - JSP.5-7
+ continue;
+ }
attrStr = generateNamedAttributeValue(attrs[i]
.getNamedAttributeNode());
} else {
// True if this node is to be trimmed, or false otherwise
private boolean trim = true;
+ // True if this attribute should be omitted from the output if
+ // used with a <jsp:element>, otherwise false
+ private boolean omit = false;
+
private ChildInfo childInfo;
private String name;
// (if null or true, leave default of true)
trim = false;
}
+ if ("true".equals(this.getAttributeValue("omit"))) {
+ // (if null or false, leave default of false)
+ omit = true;
+ }
childInfo = new ChildInfo();
name = this.getAttributeValue("name");
if (name != null) {
return trim;
}
+ public boolean isOmit() {
+ return omit;
+ }
+
/**
* @return A unique temporary variable name to store the result in.
* (this probably could go elsewhere, but it's convenient here)
private static final JspUtil.ValidAttribute[] attributeAttrs = {
new JspUtil.ValidAttribute("name", true),
- new JspUtil.ValidAttribute("trim") };
+ new JspUtil.ValidAttribute("trim"),
+ new JspUtil.ValidAttribute("omit")};
private static final JspUtil.ValidAttribute[] invokeAttrs = {
new JspUtil.ValidAttribute("fragment", true),