1

All JSF Code-Example i have seen befor have used XHTML. But why? Why i can not use HTML instead of XHTML?

For me XHTML (with all the namespaces and namespaces-tags) looks a lot less clear than normal HTML.

krokvskrok
  • 197
  • 2
  • 10
  • jsf has to be well-formed xml-documents that is why they are written xhtml. in html5 with jsf 2.2 you just import the xml namespace – hasan Aug 02 '14 at 12:09
  • "less clear" is in the eye of the beholder. I like that it's easy to see in the source which tag names belong to native html and which sections are of the various JSF modules. – Mr Lister Aug 02 '14 at 13:09
  • XHTML is used for the "X" part of it: eXtensible. JSF makes use of a lot of constructs that HTML will not cater for – kolossus Aug 02 '14 at 21:12
  • XHTML was astonishingly overhyped a decade ago. Lot of starters (particularly those from PHP world) completely fail to see/understand that XHTML is intented to be used as a templating language to generate HTML. Please don't get mislead by this ridiculous overhype. For more detail, see the duplicate and the XHTML wiki page http://stackoverflow.com/tags/xhtml/info (which you can get by clicking the "info" link in the black popbox when you hover the `[xhtml]` tag below the question). – BalusC Aug 02 '14 at 22:06

0 Answers0