2.5.2 csmschemagen command (Mapping from Java to the XML Schema)

Organization of this subsection
(1) Format
(2) Function
(3) Options
(4) Input Java source
(5) Output schema document
(6) Intermediate file
(7) Return value
(8) Notes

(1) Format

csmschemagen [option [option argument] ] [package-info.java file name] Java source file name

You can omit the option and package-info.java file. Always specify the option and package-info.java before the Java source file name.

(2) Function

Schema generator for mapping from Java to the XML Schema.

(3) Options

-d output-destination-directory
Specifies the output destination directory of the output schema document and intermediate file. For details on how to specify the output destination directory name, see Characters that can be specified in the file name or directory name of the command, path delimiting characters, and how to specify a path.
If omitted, the current directory will become the output destination directory.
-encoding character-encoding
Specifies the character encoding of the Java source to be input.
For character encoding that can be specified in Cosminexus XML Processor, see 1.3.2 Character encodings that can be processed.
If omitted, depending on the OS in use, the operations will differ as follows:
In Windows
The default character encoding for the OS is applied.
In UNIX
The character encoding specified in the environment variable LANG is applied. Even if the environment variable LANG is not specified, the default character encoding for the OS is applied.

(4) Input Java source

You can specify one Java source file. For details on the characters that can be specified in the file name, path delimiting characters, and how to specify a path, see Characters that can be specified in the file name or directory name of the command, path delimiting characters, and how to specify a path.

(5) Output schema document

Output as file name scheman.xsd (n is a numeric character) in the current directory or directory specified in the -d option. If a file with the same name exists in the output destination directory, then that file will be overwritten.

(6) Intermediate file

(7) Return value

0:
Normal termination.
Value other than 0:
Abnormal termination.

(8) Notes

Even if the Java source file input in the csmschemagen command is invalid in terms of the syntax, the schema document will be output. Do not use the schema document that is output because the schema document might be invalid in terms of the syntax.