On Sun, Dec 13, 2009 at 4:10 PM, Jason Lee <jason@steeplesoftcom> wrote:
On 12/13/09 11:16 AM, Dan Allen wrote:
One thing to keep in mind with the default namespace is that if you want to use HTML, you would have to prefix it in the case above (which might be strange to some people):

<?xml version="1.0" encoding="UTF-8"?>
<component xmlns="jsf:cc" xmlns:html="http://www.w3.org/1999/xhtml">
   <interface>
      <attribute name="name" required="true"/>
   </interface>
   <implementation>
      Hello, <html:strong>#{cc.attr.name}</html:strong>
   </implementation>
</component>
Hmm.  Yuck. :) I don't mind using cc:foo.  I already have to prefix any JSF components I use, so I don't mind using prefixes in general.  I would, however, really hate life if I had to html:prefix html:every html:last html:html html:widget (you get the point :) in the component.  I guess this being XML, you can choose the default namespace you want, but I'm not sure *I* see much in that to get excited about. :)
 
It's certainly a personal preference, but I think more than anything else, this exemplifies the flexibility you get when you treat the template as HTML. Basically, HTML doesn't have to be the top dog ;) And it depends on how much HTML you are going to use. Some composite components may not use HTML at all, but rather pure JSF component tags.

-Dan

--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen