XLink Global Attributes

The XLink namespace provides a series of global attributes that can be used independently of the local namespace. However, these attributes need to be prefixed by the appropriate namespace qualifier.

Suppose that the content of the MyLinks namespace is found in the file "MyLinksDefs.com" and the data that you want to access is found in "MyData.xml". Furthermore, suppose that the definition of the MyLinks namespace contains an entry "DateLastEdit", which of course stores the day that some item was last edited. The following would be the proper namespace-qualified way to declare your growing link:

 <MyLinks:MyXLinkElement xmlns:xlink="http://www.w3.org/1999/xlink"> xmlns:MyLinks="http://MyLinkDefs.com" xlink:href="MyData.xml" ...

Get Sams Teach Yourself XML in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.