xml spy
Previous  Top  Next
Creating a schema from scratch

A Schema describes what one or more XML documents can look like,
and defines:
·The elements the document contains, and the order in which they appear  
·The element content, and element attributes if any  

The purpose of a schema is to allow machine validation of document structure. Instead of using the syntax of XML 1.0 DTD declarations, schema definitions use XML element syntax. A correct XML schema definition is, therefore, a well-formed XML document.

Goal of this section:
The goal of this section is to create a simple schema describing a company and its employees. The company is to consist of an address and an unlimited number of persons.

This will be achieved by:
·Adding elements to the schema  
·Defining element sequences  
·Adding sub-elements to an element (child elements)  
·Creating elements using drag and drop  
·Configuring the schema view  
·Making an element optional  
·Defining an element facet  
 
 
Functions (and their icons) in this section:
 
ic_new File | New, creates a new type of XML file.  
 
ic_component Schema design | Display diagram, the component icon displays the content model of the active global component.  
ic_back2global Schema design | Display all globals, takes you back to the schema overview.  
 
TAB Takes you to the next field and automatically opens a drop-down list if one exists.  
 
CTRL+ Drag&Drop, enables you to copy existing elements.  
ic_schem_app Append icon, allows you to append an element to the schema or add a new line in the "View config." dialog (Schema design | View config.)  
 

Previous  Top  Next

© 2002 Altova