by Eric van der Vlist is published by O'Reilly & Associates (ISBN: 0596004214)


Table of Contents

11.1. A Ten-Minute Guide to XML Namespaces
11.2. The Two Challenges of Namespaces
11.3. Declaring Namespaces in Schemas
11.3.1. Using the Default Namespace
11.3.2. Using Prefixes
11.4. Accepting Foreign Namespaces
11.4.1. Constructing a Wildcard
11.4.2. Using Wildcards
11.4.3. Where Should Foreign Nodes Be Allowed?
11.4.4. Traps to Avoid
11.4.5. Adding Foreign Nodes Through Combination
11.5. Namespaces, Building Blocks, and Chameleon Design
11.5.1. Reexamining XHTML 2.0
11.5.2. Putting a Chameleon in the Library
11.5.3. Good Chameleon or Evil Chameleon?

Namespaces can be both simple and complicated. The very first example schema in this book included an attribute from the xml:lang namespace and it didn't seem like a big deal. However, if you think about it more carefully, you'll see that namespaces present two different challenges to schema languages. The first is that schema languages need to provide a way to specify which namespaces apply to the elements and attributes that are described; the second is how to cope with extensibility, one of the objectives of XML namespaces.

In this chapter, we'll take a closer look at these two challenges and how RELAX NG addresses them.

This text is released under the Free Software Foundation GFDL.