On page 84, last paragraph before the "Try It Out" section: the following sentences are confusing to me:
Quote:
|
However, attributes from a particular namespace can also be attached to elements from a different namespace. Attributes that are specifically declared to be in a namespace are called global attributes. A common example of a global attribute is the XHTML class attribute, which might be used on any XML element, XHTML or not.
|
I realize that this is early in the text and that "global attributes" are explained later. However, the way this sentence is worded it makes it sound as if there are some attributes that are global to all XML documents everywhere. Can I actually use the class attribute in any element in any XML document I create even if that attribute has never been declared in any of the namespaces declared for that document? In addition, it seems to imply that if anyone ever declares an attribute as a global attribute in any schema anywhere, then that attribute somehow can magically be used as valid in any element in any XML document anywhere.
Can someone please explain what this paragraph really means? It appears that the author is not clear as to the context within which he is writing. (This seems to be the biggest cause of confusion is all the questions I have.) Did he really mean: "Within a particular instance document with multiple declared namespaces, it is valid to use any of the attributes that were globally declared in any of those namespaces within any element of that document, regardless of the namespace of the specific element."?