Exemplo n.º 1
0
 public void internalEntityDecl(String name, String value) throws Exception {
   w.startElement("internalEntity");
   w.attribute("name", name);
   boolean useCharRef = value.length() == 1 && value.charAt(0) >= 0x80;
   w.characters(value, useCharRef);
   w.endElement();
 }
Exemplo n.º 2
0
 public void externalIdRef(
     String name, ExternalId xid, String uri, String encoding, TopLevel[] contents)
     throws Exception {
   w.startElement("externalIdRef");
   w.attribute("name", name);
   for (int i = 0; i < contents.length; i++) contents[i].accept(this);
   w.endElement();
 }
Exemplo n.º 3
0
 public void attribute(NameSpec nameSpec, Datatype datatype, AttributeDefault attributeDefault)
     throws Exception {
   w.startElement("attribute");
   nameSpec.accept(this);
   datatype.accept(this);
   attributeDefault.accept(this);
   w.endElement();
 }
Exemplo n.º 4
0
 public void overriddenDef(Def def, boolean duplicate) throws Exception {
   w.startElement("overridden");
   if (duplicate) {
     w.startElement("duplicate");
     w.attribute("name", def.getName());
     w.endElement();
   } else def.accept(this);
   w.endElement();
 }
Exemplo n.º 5
0
 public void writeDtd(Dtd dtd) throws IOException {
   String enc = dtd.getEncoding();
   if (enc != null) w.writeXmlDecl(enc);
   w.startElement("doctype");
   try {
     dtd.accept(this);
   } catch (RuntimeException e) {
     throw e;
   } catch (Exception e) {
     throw (IOException) e;
   }
   w.endElement();
 }
Exemplo n.º 6
0
 public void requiredValue() throws Exception {
   w.startElement("required");
   w.endElement();
 }
Exemplo n.º 7
0
 public void impliedValue() throws Exception {
   w.startElement("implied");
   w.endElement();
 }
Exemplo n.º 8
0
 public void fixedValue(String value) throws Exception {
   w.startElement("fixed");
   w.characters(value);
   w.endElement();
 }
Exemplo n.º 9
0
 public void ignoredSection(Flag flag, String contents) throws Exception {
   w.startElement("ignoredSection");
   if (flag instanceof FlagRef) w.attribute("flag", ((FlagRef) flag).getName());
   w.characters(contents);
   w.endElement();
 }
Exemplo n.º 10
0
 public void enumGroupDef(String name, EnumGroup enumGroup) throws Exception {
   w.startElement("enumGroup");
   w.attribute("name", name);
   enumGroup.accept(this);
   w.endElement();
 }
Exemplo n.º 11
0
 public void modelGroupDef(String name, ModelGroup modelGroup) throws Exception {
   w.startElement("modelGroup");
   w.attribute("name", name);
   modelGroup.accept(this);
   w.endElement();
 }
Exemplo n.º 12
0
 public void processingInstruction(String target, String value) throws Exception {
   w.startElement("processingInstruction");
   w.attribute("target", target);
   w.characters(value);
   w.endElement();
 }
Exemplo n.º 13
0
 public void name(String value) throws IOException {
   w.startElement("name");
   w.characters(value);
   w.endElement();
 }
Exemplo n.º 14
0
 public void nameSpecDef(String name, NameSpec nameSpec) throws Exception {
   w.startElement("nameSpec");
   w.attribute("name", name);
   nameSpec.accept(this);
   w.endElement();
 }
Exemplo n.º 15
0
 private void attributeIfNotNull(String name, String value) throws IOException {
   if (value != null) w.attribute(name, value);
 }
Exemplo n.º 16
0
 public void notationDecl(String name, ExternalId xid) throws IOException {
   w.startElement("notation");
   w.attribute("name", name);
   externalId(xid);
   w.endElement();
 }
Exemplo n.º 17
0
 public void ignore() throws IOException {
   w.startElement("ignore");
   w.endElement();
 }
Exemplo n.º 18
0
 public void externalIdDef(String name, ExternalId xid) throws IOException {
   w.startElement("externalId");
   w.attribute("name", name);
   externalId(xid);
   w.endElement();
 }
Exemplo n.º 19
0
 public void elementDecl(NameSpec nameSpec, ModelGroup modelGroup) throws Exception {
   w.startElement("element");
   nameSpec.accept(this);
   modelGroup.accept(this);
   w.endElement();
 }
Exemplo n.º 20
0
 public void nameSpecRef(String name, NameSpec nameSpec) throws Exception {
   w.startElement("nameSpecRef");
   w.attribute("name", name);
   w.endElement();
 }
Exemplo n.º 21
0
 public void attlistDecl(NameSpec nameSpec, AttributeGroup attributeGroup) throws Exception {
   w.startElement("attlist");
   nameSpec.accept(this);
   attributeGroup.accept(this);
   w.endElement();
 }
Exemplo n.º 22
0
 public void flagDef(String name, Flag flag) throws Exception {
   w.startElement("flag");
   w.attribute("name", name);
   flag.accept(this);
   w.endElement();
 }
Exemplo n.º 23
0
 public void comment(String value) throws Exception {
   w.startElement("comment");
   w.characters(value);
   w.endElement();
 }
Exemplo n.º 24
0
 public void include() throws IOException {
   w.startElement("include");
   w.endElement();
 }
Exemplo n.º 25
0
 public void attributeGroupDef(String name, AttributeGroup attributeGroup) throws Exception {
   w.startElement("attributeGroup");
   w.attribute("name", name);
   attributeGroup.accept(this);
   w.endElement();
 }
Exemplo n.º 26
0
 public void defaultValue(String value) throws Exception {
   w.startElement("default");
   w.characters(value);
   w.endElement();
 }
Exemplo n.º 27
0
 public void datatypeDef(String name, Datatype datatype) throws Exception {
   w.startElement("datatype");
   w.attribute("name", name);
   datatype.accept(this);
   w.endElement();
 }
Exemplo n.º 28
0
 public void includedSection(Flag flag, TopLevel[] contents) throws Exception {
   w.startElement("includedSection");
   if (flag instanceof FlagRef) w.attribute("flag", ((FlagRef) flag).getName());
   for (int i = 0; i < contents.length; i++) contents[i].accept(this);
   w.endElement();
 }
Exemplo n.º 29
0
 public void attributeDefaultDef(String name, AttributeDefault attributeDefault) throws Exception {
   w.startElement("attributeDefault");
   w.attribute("name", name);
   attributeDefault.accept(this);
   w.endElement();
 }
Exemplo n.º 30
0
 public void paramDef(String name, String value) throws IOException {
   w.startElement("param");
   w.attribute("name", name);
   w.characters(value);
   w.endElement();
 }