I was reading up on FOAF today, and checking out an introduction at XML.com. On first blush, my gut feeling looking at the examples was that the FOAF dialect was messy and cumbersome. However, being the XML geek that I am, I stuck with it for another few minutes and decided it’s really very simple and straightforward.
I think the problem is that namespaces totally ruin the flow of reading for people, and if developers get turned off initially, it’s hard to ever win their hearts. Now I know all the logical reasons behind namespaces, but there has to be a way to get all the benefits of controlled, typed vocabularies while maintaining ease of reading and writing.
My proposal is to slightly modify the way XML elements are checked for their namespace. Right now, you can only have one (default) namespace that doesn’t have to be prefixed. I say why not make all namespace prefixes optional. Parsers should check the namespaces in the order they are listed at the top of the XML file to locate what namespace the element comes from. Using this method, only XML elements that are present in more than one listed namespace would have to be prefixed. Sure, it’s more work for parsers, but that’s a small price to pay for readability, writeability, and XML adoption.