summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine/TodoXemptyAttr.java
blob: 332a63c1d283dcdd7c5fd46fe103e2ffc8c5dce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package org.madore.damlengine;

import org.w3c.dom.*;

public class TodoXemptyAttr extends TodoAttr {

    public static class Factory extends TodoAttr.Factory {
	@Override
	public TodoXemptyAttr newItem(Attr attr, Element owner,
				      Context ctx,
				      TodoItem caller) {
	    return new TodoXemptyAttr(attr, owner, ctx, caller);
	}
    }

    public TodoXemptyAttr(Attr attr, Element owner,
			  Context ctx,
			  TodoItem caller) {
	super(attr, owner, ctx, caller);
    }

    @Override
    public void handle() {
	this.owner.removeAttributeNode(this.attr);
	this.owner.appendChild(ctx.doc.createComment(" EMPTY "));
    }

}