Skip to content

Commit

Permalink
Merge pull request #23 from Saxonica/fixenum
Browse files Browse the repository at this point in the history
Fix the way enums are handled; release 0.16.0
  • Loading branch information
ndw authored Oct 29, 2024
2 parents 226f7b4 + 92f60ae commit c098eb5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docletVersion=0.15.0
schemaVersion=0.13.0
docletVersion=0.16.0
schemaVersion=0.16.0
docletTitle=XmlDoclet
docletName=xmldoclet
7 changes: 7 additions & 0 deletions sample/src/main/java/org/example/EnumTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package org.example;

public class EnumTest {
private enum XmlState {NOT_STARTED, IN_DOCUMENT, START_ELEMENT, CONTENT, OUT_DOCUMENT};
private XmlState state;

}
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ public void recursiveRefs(Element element) {
case INTERFACE:
TypeUtils.xmlType(builder, "interfaceref", child.asType());
break;
case ENUM:
TypeUtils.xmlType(builder, "enumref", child.asType());
break;
case ANNOTATION_TYPE:
TypeUtils.xmlType(builder, "annotationtyperef", child.asType());
break;
case ENUM:
case ENUM_CONSTANT:
case FIELD:
case METHOD:
case CONSTRUCTOR:
Expand Down
10 changes: 1 addition & 9 deletions xmldoclet/src/main/resources/doclet.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ package =
attribute name { text },
purpose?,
description?,
(classref|interfaceref|enumref|annotationtyperef)*
(classref|interfaceref|annotationtyperef)*
}

classref =
Expand All @@ -70,14 +70,6 @@ interfaceref =
param*
}

enumref =
element enumref {
attribute package { text }?,
attribute name { text },
attribute fullname { text },
empty
}

annotationtyperef =
element annotationtyperef {
attribute package { text }?,
Expand Down

0 comments on commit c098eb5

Please sign in to comment.