users@javaserverfaces-spec-public.java.net

[jsr344-experts mirror] [jsr344-experts] [1111-PassThroughElements] What's in a Name(space)?

From: Edward Burns <edward.burns_at_oracle.com>
Date: Tue, 12 Mar 2013 13:32:11 -0700

>>>>> On Sat, 02 Mar 2013 21:54:54 +0100, Michael Müller <michael.mueller_at_mueller-bruehl.de> said:

MM> <html xmlns="http://www.w3.org/1999/xhtml"
MM> xmlns:jsf="http://java.sun.com/jsf" >
MM> <head jsf:id="head">[...]

MM> is equivalent to

MM> <html xmlns="http://www.w3.org/1999/xhtml">
MM> <head jsf:id="head">[...]

I don't see how these two things are equivalent. In the latter, you do
not declare a namespace for the jsf: prefix. That seems invalid.

MM> What happens, if someone would declare
MM> <html xmlns="http://www.w3.org/1999/xhtml"
MM> xmlns:jsf="http://myCompany.com/myNameSpace" >
MM> <head jsf:id="head">[...]

MM> The prefix jsf then still is used for JSF even though pointing to a
MM> different namespace.

The implementation doesn't look at the user-defined prefix. It looks at
the namespace URL associated with that prefix. I just tested this by
using another string other than jsf as the prefix. I will fix the docs.
   
>>>>> On Sat, 02 Mar 2013 22:16:57 +0100, Michael Müller <michael.mueller_at_mueller-bruehl.de> said:

MM> I still belive, this is not a good way.

>>>>> On Sun, 03 Mar 2013 08:05:40 -0500, Andy Schwartz <andy.schwartz_at_oracle.com> said:

AS> I haven't had a chance to read up on the context for this, but I wanted
AS> to chime in to say that the JSF spec should never associate behavior
AS> with namespace prefixes. The spec should only associate behavior with
AS> namepsaces. Sure, the spec can recommend conventions for namespace
AS> prefix mappings. However, our users should always be free to define
AS> their own mappings.

Yes, that's correct. The behavior is associated with the namespace not
a particular choice of prefix. I am fixing the TagDecorator API doc now.

AS> If we have cases in the spec where we require that a namespace prefix
AS> has some meaning regardless of how that prefix is mapped, we need to fix
AS> this.

Yes.

>>>>> On Sun, 3 Mar 2013 20:23:25 +0100, Frank Caputo <frank_at_frankcaputo.de> said:

FC> But I think, a native english speaker should disambiguate this sentence.

Perhaps, but I'm going to clarify anyway.

>>>>> On Sun, 3 Mar 2013 14:29:58 -0500, Leonardo Uribe <lu4242_at_gmail.com> said:

LU> Frank, could you try if TagDecorator still works even if you change
LU> jsf prefix with something else? For example, on the top of the page
LU> set http://java.sun.com/jsf namespace to a prefix like xsf and check
LU> if that one still works.

Yes, I've tried that and it still works.

This will be in the final.

Ed