• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

XML Namespaces

lchyi

Senior member
I keep reading tutorials but I think I'm still confused on what XML namespaces are supposed to do.

So here's what I understand so far:

Made up XML tags sometimes conflict with other understood tags like if you're describing <table> as a piece of furinture and it could conflict with <table> the html tag. So you put a prefix <furniture:table xmlns:furniture="http://anandtech.com/namespaces"> and then use the table tag with the furniture prefix to distinguish it so: <furniture:table>IKEA Modern Coffee Table</table>.

Do I got the right idea or am I totally off. I mean why'd they choose to use URI names? Couldn't they use some kind of generated code or user made up namespaces?
 
Yep, that's about right. Namespaces are just ways to scope your elements so they don't conflict with other people. URI's are used because that's what the standard says to use. There' s really no magic reason. A lot of people actually put information about the namespace at the URI location.

There's nothing really fancy going on and it sounds like you pretty much understand it.
 
Back
Top