Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XML Namspaces

From: "Joseph J. Kesselman" <keshlam-nospam@-------.--->
To: NULL
Date: 5/5/2008 7:23:00 PM

Chase Preuninger wrote:
> I have I big book on XML, I just never really got the entire thing
> about the xmlns.

Namespaces are a way of managing XML-based grammars so they can be 
reliably recognized by applications, and if necessary intermixed in a 
single document. The xmlns attributes are used to bind prefixes (which 
are just "syntactic sugar" shorthand) to the namespace names (strings 
formatted as absolute URI references). Those bindings are scoped, so the 
same prefix may mean different URIs in different parts of the program. 
It's also possible to set up a default namespace for elements in one of 
those parts, just to save a bit of typing. (This sometimes improves 
readabilty, sometimes makes it worse.)

The namespace names are formatted as URI references because "we already 
know how to manage those so they won't conflict with each other." And 
that's all there is to that. The namespace name has no other built-in 
meaning beyond being the name for this namespace. There is no guarantee 
that there is anything meaningful behind that URI if you try to 
dereference it, or what you might find there if anything is present. 
Basically, you shouldn't be trying. (The Semantic Web folks said they 
would come up with a standard for what a namespace URI might point to. I 
haven't heard any concrete proposals, and it's been several years. Don't 
hold your breath.)

So namespaces are just an alternative to having to always type a 
<gawdaful_long_name_that_you_hope_nobody_else_used/>. That really is all 
there is to them.


Most modern XML standards assume you're working with namespaced 
documents. XML Schema, XPath, XSLT, the Semantic Web stuff, XHTML, 
XQuery, and so on all assume namespaces are a prerequisite.

Read some tutorials and/or re-read that section of the book -- or find 
another document which explains this better.



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent