6.20.2 Notes on schema compiler
The following subsections give cautionary notes on schema compiler.
Do not process the schema corresponding to the notes described in item no. 1 to item no. 28 by the schema compiler. For item no. 29 to item no. 44, use the schema compiler after considering the notes.
No. |
Notes |
---|---|
1 |
[Conditions] When all of the following conditions are applicable to contents model with iterative specifications:
(Example) <xs:complexType> <xs:sequence maxOccurs="unbounded"> <xs:element name="A" type="xs:string" /> <xs:element name="B" type="xs:int" nillable="true" /> <xs:element name="C" type="xs:float" nillable="true"/> <xs:element name="D" type="xs:double" /> </xs:sequence> </xs:complexType> Operation of Cosminexus XML Processor A collection is optimized. The collection annotated with @XmlElements/@XmlElement instead of @XmlElementRefs/@XmlElementRef is output. An invalid operation might be performed when unmarshal and marshal is executed using the java source that is output. |
2 |
[Conditions] When all of the following conditions are applicable:
Operations of Cosminexus XML Processor Error occurs. (Example) [ERROR] .\hitachi\com1\ObjectFactory.java (The specified path is not found. [errno=3, syscall=CreateFileW]) |
3 |
[Conditions] When all of the following conditions are applicable to the first character of the character string that separates the URI specified in the targetNamespace attribute of the xs:schema element by a colon (:) or forward slash (/):
Operations of Cosminexus XML Processor An error indicating an invalid package name occurs. (Example) [ERROR] The package name 'publicid.__-.w3c.dtd_html_4_01.en' used for this schema is not a valid package name. |
4 |
[Conditions] When the URI specified in the targetNamespace attribute and xmlns attribute of the xs:schema element is configured only from the following characters:
Operations of Cosminexus XML Processor Exceptions that are not provided such as java.lang.ArrayIndexOutOfBoundsException might occur. |
5 |
[Conditions] When any of the following conditions are satisfied:
Operations of Cosminexus XML Processor An error occurs by trying to generate multiple properties and not a single general contents property. For details about the general contents properties, see the subsection 6.12.3 of JSR 222 The Java Architecture for XML Binding 2.1. (Example) [ERROR] Property "Any" is already defined. Use <jaxb:property> to resolve this conflict. Note that if you specify jaxb:property custom binding and execute unmarshalling or marshalling using the java source with multiple @XmlAnyElement annotated properties that are output, some invalid operations might be performed. |
6 |
[Conditions] When any of the following conditions are satisfied:
Operations of Cosminexus XML Processor The method for acquiring a child element of the derived format will not be generated. |
7 |
[Conditions] When all of the following conditions are applicable:
Operations of Cosminexus XML Processor The enumeration constant name of the Java class is generated based on the name attribute specified in condition 1. |
8 |
[Conditions] When custom binding is specified in any of the following XML schema elements:
Operations of Cosminexus XML Processor The operations during the execution of JAXB when such a schema document is used are not regulated. |
9 |
[Conditions] When all of the following conditions are applicable:
Operations of Cosminexus XML Processor An error indicating invalid custom binding is output. (Example) [ERROR] compiler was unable to honor this class customization. It is attached to a wrong place, or its inconsistent with other bindings. |
10 |
[Conditions] When the jaxb:class custom binding is specified for the local element definition (xs:element containing =xs:complexType as the child element) whose type is defined as an anonymous complex type. Operations of Cosminexus XML Processor An error is output. (Example) Exception in thread "main" java.lang.IllegalArgumentException: Illegal class inheritance loop. Outer class element-name may not subclass from inner class: element-name |
11 |
[Conditions] When the jaxb:property custom binding is specified for xs:choice, xs:sequence, or xs:all specified in the complex type definition xs:restriction. Operations of Cosminexus XML Processor An error is output. (Example) [ERROR] compiler was unable to honor this property customization. It is attached to a wrong place, or its inconsistent with other bindings. |
12 |
[Conditions] When all of the following conditions are applicable:
Operation of Cosminexus XML Processor The message KECX06051-E cvc-enumeration-valid: Value 'true' is not facet-valid with respect to enumeration '[false]'. It must be a value from the enumeration. occurs. The value true specified in the map attribute is correct, but the specification of the jaxb:typesafeEnumClass custom binding in the xs:complexType element itself is invalid. |
13 |
[Conditions] When any of the following conditions are satisfied:
Operations of Cosminexus XML Processor The java class is generated without an error occurrence. |
14 |
[Conditions] When specifying an empty character string is specified in the collectionType attribute of jaxb:globalBindings. Operations of Cosminexus XML Processor Throws the exception java.lang.StringIndexOutOfBoundsException. |
15 |
[Conditions] When any of the following conditions are satisfied:
Operations of Cosminexus XML Processor An error does not occur. In such cases, the operations for executing JAXB are not defined. |
16 |
[Conditions] When all the following conditions are satisfied:
Operations of Cosminexus XML Processor An error does not occur. In such cases, the operations for executing JAXB are not defined. |
17 |
[Conditions] When all the following condition are satisfied:
Operations of Cosminexus XML Processor An error does not occur. When the map attribute is not specified, the operations with the specified true or 1 will be executed by default. |
18 |
[Conditions] When all the following conditions are satisfied:
Operations of Cosminexus XML Processor An error does not occur. Java source including the property is output. |
19 |
[Conditions] When all the following conditions are satisfied:
Operations of Cosminexus XML Processor An error does not occur. Java source including JAXBElement is output. |
20 |
[Conditions] When any of the following conditions are satisfied:
Operations of Cosminexus XML Processor An error does not occur. Java source is output. |
21 |
[Conditions] When the attachmentRef attribute of the jaxb:property custom binding is to be used. Operations of Cosminexus XML Processor The following error is output during the schema compilation: [ERROR] KECX06031-E cvc-complex-type.3.2.2: Attribute 'attachmentRef' is not allowed to appear in element 'jaxb:property'. |
22 |
[Conditions] When specifying character strings other than asWordSeparator or asCharInWord, in the underscoreBinding attribute of the jaxb:globalBindings custom binding. Operations of Cosminexus XML Processor The NullPointerException exception is thrown. |
23 |
[Conditions] When specifying skipGeneration in the typesafeEnumMemberName attribute of the jaxb:globalBindings custom binding. Operations of Cosminexus XML Processor The following error is output: KECX06051-E cvc-enumeration-valid: Value 'skipGeneration' is not facet-valid with respect to enumeration '[generateError, generateName]'. It must be a value from the enumeration. Workaround When the typesafeEnumMemberName attribute is not specified, the default operation changes to the skipGeneration operation. |
24 |
[Conditions] When specifying and customizing the jaxb:globalBindings custom bindings multiple times:
Operations of Cosminexus XML Processor In such cases, the operations for executing JAXB are not defined. |
25 |
[Conditions] When all the following conditions are satisfied:
Operations of Cosminexus XML Processor Output in wrapper class type and not the primitive type. |
26 |
[Conditions] When all the following conditions are satisfied:
Operations of Cosminexus XML Processor An error does not exist. In such case, the operations for executing JAXB are not defined. |
27 |
[Conditions] When specifying jaxb:inlineBinaryData in xs:complexType having simple contents of the binary type. Operations of Cosminexus XML Processor An invalid custom binding error is output. Example: [ERROR] compiler was unable to honor this inlineBinaryData customization. It is attached to a wrong place, or its inconsistent with other bindings. |
28 |
[Conditions] Anyone of the following conditions are satisfied:
Operations of Cosminexus XML Processor An error does not occur. |
29 |
The standard specifications provide the methods for customizing the contents of the documentation comments of Java classes generated using the jaxb:javadoc custom binding. Even when jaxb:javadoc is not specified, the default documentation comments are generated, but the contents are not provided in the standard specifications. |
30 |
[Conditions] When there is a simple type definition where the range specified in any of the xs:totalDigits, xs:maxExclusive, xs:maxInclusive, xs:minExclusive, or xs:minInclusive facets is within the int or long range. Operations of Cosminexus XML Processor java.math.BigInteger is generated always when the xs:totalDigits facet is used. When the xs:maxExclusive, xs:maxInclusive, xs:minExclusive, or xs:minInclusive facet is used, the Java type is generated according to the algorithm specified in the subsection 6.2.2 of JSR 222 The Java Architecture for XML Binding 2.1. |
31 |
[Conditions] When a model group definition containing any of the following exists:
Operations of Cosminexus XML Processor The model group name is not added to the created class name. |
32 |
[Conditions] When the jaxb:class custom binding is specified in the xs:element local element definition. Operations of Cosminexus XML Processor Inherits JAXBElement<T> and creates element factory method that returns the created classes. (Example) public class ObjectFactory { public Base.Bar createBaseBar(String value) { return new Base.Bar(value); } .... }
|
33 |
[Conditions] When all of the following conditions are applicable:
Operations of Cosminexus XML Processor The element factory method corresponding to the element definition is generated, but instances cannot be generated using the factory method. |
34 |
[Conditions] When either of the following is applicable to the schema document:
Operations of Cosminexus XML Processor The name conflicting error does not occur, and the process is performed as a general contents list annotated by @XmlElementRef/@XmlElementRefs. For details about the contents list, see the subsection 6.12.3 of JSR 222 The Java Architecture for XML Binding 2.1. |
35 |
[Conditions] When either lax or skip is specified in the processContents attribute of xs:any. Operations of Cosminexus XML Processor The data type of the bind property will be the java.lang.Object type when the processContents attribute is lax, and the org.w3c.dom.Element type when the processContents attribute is skip. |
36 |
[Conditions] When the fixed attribute of the xs:element element is specified. Operations of Cosminexus XML Processor The value of the specified fixed attribute is not applied to the defaultValue element of @XmlElement and @XmlElementDecl of the Java source that is generated. [Corrective action] To apply the value of the fixed attribute as a default value, specify the default attribute instead of the fixed attribute. |
37 |
[Conditions] When a character string is specified in the value attribute of the xs:enumeration element in such a way so that there are conflicts in the generated java constant identifier. (Example) name-with-dashes and name_with_dashes Operations of Cosminexus XML Processor The enumeration definition is not output. No error occurs. |
38 |
[Conditions] When all of the following conditions are applicable to the URI specified in the targetNamespace attribute of the xs:schema element:
Operations of Cosminexus XML Processor The domain name of the package name of generated java source will be in the reverse order, and www. will be deleted. |
39 |
[Conditions] When any of the following is specified in the element name and attribute name:
Operations of Cosminexus XML Processor The field and method name will be generated without the occurrence of a name conflicting error. A field name with an underscore"_" will be created for java keyword and java literal. |
40 |
[Conditions] When a redefined complex type definition exists. Operations of Cosminexus XML Processor For a redefined complex type definition, a class name with the prefix Original is generated instead of a class name with attached _. |
41 |
[Conditions] When all the following conditions are satisfied:
Operations of Cosminexus XML Processor The model group definitions are not mapped in a class, so the specification of jaxb:modelGroupName is not applied to the generated source. |
42 |
[Conditions] When all the following conditions are satisfied:
Operations of Cosminexus XML Processor A Java identifier different from the specifications is generated. Example:
|
43 |
[Conditions] When all the following conditions are satisfied:
Operations of Cosminexus XML Processor The conversion into an appropriate java identifier is not executed. |
44 |
[Conditions] When specifying jaxb:serializable without the uid attribute, in the jaxb:globalBindings custom binding. Operations of Cosminexus XML Processor An error does not occur. In such cases, the operations for executing JAXB are not defined. |