O'Reilly logo

Special Edition Using XML, Second Edition by - et al. David Gulbransen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required