O'Reilly logo

Definitive XML Schema by Priscilla Walmsley

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

Chapter 8 Attribute declarations

This chapter covers the other basic building block of XML: attributes. It explains how to declare attributes and assign types to them. It also describes fixed and default values as they apply to attributes.

8.1 Global and local attribute declarations

Attribute declarations are used to name an attribute and associate it with a particular simple type. In XSDL, this is accomplished using an attribute element. Attribute declarations may be either global or local.

8.1.1 Design hint: Should I use attributes or elements?

Whether to model data values as elements or attributes is an often-discussed question. XML Schema, with its ability to define data types for elements, ...

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