Element Declarations in XML Schemas
In Chapter 4, we learned about XML declarations in Document Type definitions. Physical structures, such as element declarations and attribute declarations, are defined in the first part of the XML Schema Recommendation: Structures. In XML Schemas, element declarations take a different form:
<xs:element name="address" type="xs:string"/>
This is a basic element declaration in XML Schema. The declaration uses the element type, which has a number of attributes that manipulate properties of the element. In the preceding declaration, there is a name attribute, which is used to specify the name of the element type being declared. There is also a type attribute, which is how you specify the datatype associated with ...
Get Special Edition Using XML, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.