O'Reilly logo

Secure XML: The New Syntax for Signatures and Encryption by Kitty Niles, Donald E. Eastlake

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

5.4. Namespaces

Schemas are reasonably well integrated with namespaces. The xs:schema element, for example, should normally have a targetNamespace attribute. It indicates the namespace in which the elements and attributes defined by the schema should appear. If no such attribute exists, the schema is intended for unqualified names—perhaps to validate some XML designed before namespaces were recommended.

When a targetNamespace exists, that namespace must qualify all global elements and attributes. Local elements and attributes are a different matter, however. By default, they are unqualified and, in effect, get their namespace from their nearest global ancestor. But either or both of the elementForm-Default and attributeFormDefault attributes ...

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