Generating Java code for schema results in syntactically invalid java code --------------------------------------------------------------------------
Key: XMLBEANS-405 URL: https://issues.apache.org/jira/browse/XMLBEANS-405 Project: XMLBeans Issue Type: Bug Components: Compiler Affects Versions: Version 2.4 Environment: JDK 1.5.0 Reporter: Chris Rose Priority: Critical When generating java code from an XSD, one of the generated classes ends up with this bit of magic in it: static final null.Enum SMIME = null.SMIME; static final null.Enum PGPMIME = null.PGPMIME; static final int INT_SMIME = null.INT_SMIME; static final int INT_PGPMIME = null.INT_PGPMIME; Interestingly enough, these constants are used exactly nowhere else in the code, and deleting them fixes all of the compilation errors, but I can't help but think that something more subtle is going wrong. Here's the bit of XSD (it's converted from RNG, so please ignore any weird formatting) that leads to this code: <xs:element name="security_format"> <xs:complexType> <xs:simpleContent> <xs:restriction base="xs:anyType"> <xs:simpleType> <xs:restriction base="xs:token"> <xs:enumeration value="smime"/> <xs:enumeration value="pgpmime"/> </xs:restriction> </xs:simpleType> <xs:attribute name="version"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:pattern value="[1-9](\.[0-9](\.[0-9])?)?"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:restriction> </xs:simpleContent> </xs:complexType> </xs:element> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: dev-h...@xmlbeans.apache.org