Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Preface > Conventions Used in This Book

P1.5. Conventions Used in This Book

This section covers typographic conventions and the format used for XML structure diagrams.

P1.5.1. Typographic Conventions


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.

Indicates a tip, suggestion, or general note.


Indicates a warning or caution.


P1.5.2. XML Schema/DTD Diagrams

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-1. Key to XML structure diagrams


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>

Figure P-2. XML structure diagram


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.