Herzliche Grüße - Best Regards,
Michael Müller
Am 28.02.2013 22:15, schrieb Edward Burns:
>>>>>> On Sun, 24 Feb 2013 08:41:31 +0100, Michael Müller <michael.mueller_at_mueller-bruehl.de> said:
> MM> Hi Ed,
> MM> From Interfac TagDecorator:
> MM> "A selector attribute name prefixed with *jsf:* means in the
> MM> |http://java.sun.com/jsf| namespace."
>
> Thanks. I've fixed it
>
> MM> Or does it mean "treat prefix jsf always as ofhttp://java.sun.com/jsf even though it is not declared"?
>
> yes, the latter.
>
> Ed
>
Hm, just parsing for JSF and then calling TagDecorator is quite simple,
with the smell of quick'n'dirty.
Thus
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:jsf="
http://java.sun.com/jsf" >
<head jsf:id="head">[...]
is equivalent to
<html xmlns="
http://www.w3.org/1999/xhtml">
<head jsf:id="head">[...]
What happens, if someone would declare
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:jsf="
http://myCompany.com/myNameSpace" >
<head jsf:id="head">[...]
The prefix jsf then still is used for JSF even though pointing to a different namespace.
IMHO it is better to use a fixed namespace with mutable prefix
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:jsf="
http://java.sun.com/jsf" >
<head jsf:id="head">[...]
equivalent to
<html xmlns="
http://www.w3.org/1999/xhtml"
xmlns:XXX="
http://java.sun.com/jsf" >
<head XXX:id="head">[...]
This approach is a bit more sophistiocated to implement, but it would be a cleaner, especially standardized usage.