1 package net.jaekl.cfb.xml;
3 import java.io.PrintWriter;
5 import org.xml.sax.Attributes;
7 import net.jaekl.qd.xml.MissingAttributeException;
8 import net.jaekl.qd.xml.ParseResult;
9 import net.jaekl.qd.xml.XmlParseException;
11 public class LocalVariable extends ParseResult {
13 static final String TAG = "LocalVariable";
14 static final String[] INTERNAL = { };
15 static final Object[][] EXTERNAL = { };
17 static final String NAME = "name";
18 static final String ROLE = "role";
23 public LocalVariable() {
24 super(TAG, INTERNAL, EXTERNAL);
26 m_name = m_role = null;
30 public void handleMainAttributes(Attributes attr)
31 throws MissingAttributeException
33 m_name = getRequiredAttr(TAG, attr, NAME);
34 m_role = getRequiredAttr(TAG, attr, ROLE);
38 public void endContents(String uri, String localName, String qName, String chars)
39 throws XmlParseException
44 public void endExternal(String uri, String localName, String qName)
45 throws XmlParseException
51 public void dump(PrintWriter pw, int indent)
53 super.dump(pw, indent);
54 String tab = String.format("%" + (indent + 2) + "s", "");
56 pw.println(tab + NAME + "=" + m_name);
57 pw.println(tab + ROLE + "=" + m_role);