3

I was reading this blog by James Bennett regarding HTML vs XHTML . He writes :

I don’t have any need for namespaced content; I’m not displaying any complex mathematical notation here and don’t plan to, and I don’t use SVG for any images. So that’s one advantage of XHTML out the window. I also don’t have any need for XML tools; all the processing I need to do can be handled by HTML-parsing libraries like BeautifulSoup. That’s the other advantage gone.

What does he mean by namespaced content and what advantage does it provide us ?

Geek
  • 5,107
  • 8
  • 40
  • 58

1 Answers1

5

XML namespaces allow including XML elements defined in a schema other than that of the main document. Specifically, the article talks about MathML and SVG, which are XML-based formats that can be directly embedded in an XHTML document using namespaces, looking like this:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:m="http://www.w3.org/1998/Math/MathML">
  XHTML content goes here
  <m:math>
      MathML content goes here
  </m:math>
  more XHTML content
</html>
Michael Borgwardt
  • 51,037
  • 13
  • 124
  • 176