There were some questions asked about namespaces at the Annapolis CFUG talk on
XHTML.
Namespaces are a way of indicating that an XML tagged piece of data is
unique to something. That is, "<para>" could refer to a paragraph, a
paramedic, or a paragraph. You can use a namespace prefix with this tag
or wrap it with a namespace tag to associate it with that which gives it
meaning, for instance a group of related tags also associated with the
namespace. You use lines like:
<html: ... xmlns:er="http://somedomain.com/ER/ ..."> (paraphrased)
to say that the tags prefixed with "er:" are related and unique from say
html tags or tags with another prefix. The
"http://somedomain.com/ER/" does not have to even be a real URL, it is not
looked up.
Namespaces can make it easier to write applications and scripts using XML
by helping make things clearer.
- by Timothy Belet <[email protected]>
|