Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
This section covers typographic conventions and the format used for XML structure diagrams.
Italic
Used for emphasis and to signify the first use of a term. Italic is also used for commands and file and directory names.
Constant width
Used in all Java code and generally for anything that you would type literally when programming, including options, keywords, data types, constants, method names, variables, class names, and interface names.
Constant width italic
Used for the names of function arguments and generally as a placeholder to indicate an item that should be replaced with an actual value in your program.
Constant width
bold
Used for user input on the command line.
|
|
In a number of places in the book, we need to describe the structure of specific XML formats (based on either DTDs or XML schemas). We've chosen to use a simplified diagram format to show these XML structures graphically. This format is described in the key in Figure P-1.
Figure P-2 shows a sample XML structure diagram. Here is sample XML data that follows this structure:
<xyz-component>
. . .
<component-detail>
<comp-name>Name</comp-name>
</component-detail>
<param>
<param-name>param1</param-name>
<param-value>value1</param-value>
<param-value>value2</param-value>
</param>
. . .
</xyz-component>Note that these XML diagrams are simplified and don't describe all aspects of XML schemas or DTDs. They do not include element attributes, for example, nor do they describe element sequence constraints in XML schemas. They are meant to provide a high-level view of the XML structure only. For precise details, the corresponding DTD or schema should be consulted.