Re: Global Attributes Not Covered by the XML Specification?

Axel Dahmen wrote:
> 
> In the XLink specification 1.0, chapter 4, it says: "XLink's namespace
> provides global attributes for use on elements that are in any arbitrary
> namespace."
> 
> As far as I've learned from the specs and the newsgroup, neither XML nor XML
> Namespaces provide a mechanism to define global attributes.
> 
> Shouldn't the definition of global attributes be covered by the XML
> specification?

Not by *the* XML specification, but by *some* XML-related
specification(s), yes.

> How can someone make use of something undefined?

By layering definitions on top; TCP has a port number field,
but it's not completely defined by the TCP specs; to use
port 21, you read the SMTP spec; to use port 80, you
consult the HTTP spec, and so on.

The web uses late binding to figure out what's at the other
end of an identifier, so the analogy of a port number doesn't
fit exactly; but given a document with some attributes,
if they're namespace qualified, and if you can find
a specification for that namespace (e.g. by fetching one
via HTTP), that specification
may have some global attribute definitions.

XML Schema has a mechanism for global attributes:

  4.3.1 XML Representation of Attribute Declaration Schema Components
  http://www.w3.org/TR/2000/CR-xmlschema-1-20001024/#declare-attribute

and the partNum, weightKg, etc. examples in the primer
  http://www.w3.org/TR/xmlschema-0/#AttrGroups

RDF also has a mechanism:

[[[
2.2.2. Basic Abbreviated Syntax

[...] properties may be written as XML attributes of the Description
element. The previous example then becomes:

  <rdf:RDF>
    <rdf:Description about="http://www.w3.org/Home/Lassila"
                     s:Creator="Ora Lassila" />
  </rdf:RDF>
]]]

--        Resource Description Framework (RDF) Model and Syntax
Specification
http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/
Wed, 24 Feb 1999 14:45:07 GMT

> Axel Dahmen

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Monday, 8 January 2001 17:07:16 UTC