What are XML namespaces for?

They’re for allowing multiple markup languages to be combined, without having to worry about conflicts of element and attribute names.

For example, look at any bit of XSLT code, and then think what would happen if you didn’t use namespaces and were trying to write an XSLT where the output has to contain “template”, “for-each”, etc, elements. Syntax errors, is what.

I’ll leave the advice and pitfalls to others with more experience than I.

Leave a Comment