jakartaee / faces

Jakarta Faces
Other
102 stars 54 forks source link

Faces 4.0: rename xmlns.jcp.org taglib URIs #1553

Closed BalusC closed 3 years ago

BalusC commented 3 years ago

Proposal: use URNs instead of URLs as URLs are more prone to confuse people.

Rename http://xmlns.jcp.org/jsf to jakarta.faces Rename http://xmlns.jcp.org/jsf/facelets to jakarta.faces.facelets Rename http://xmlns.jcp.org/jsf/core to jakarta.faces.core Rename http://xmlns.jcp.org/jsf/html to jakarta.faces.html Rename http://xmlns.jcp.org/jsf/passthrough to jakarta.faces.passthrough Rename http://xmlns.jcp.org/jsf/composite to jakarta.faces.composite Rename http://xmlns.jcp.org/jsf/component to jakarta.faces.component

<html
    xmlns:faces="jakarta.faces"
    xmlns:ui="jakarta.faces.facelets"
    xmlns:f="jakarta.faces.core"
    xmlns:h="jakarta.faces.html"
    xmlns:pt="jakarta.faces.passthrough"
    xmlns:cc="jakarta.faces.composite"
    xmlns:my="jakarta.faces.component"
>
    ...
</html>

Thoughts?

christophs78 commented 3 years ago

Should this values be prefixed with "urn:"? Not totally sure what XML allows.

tandraschko commented 3 years ago

+1

edbratt commented 3 years ago

As an expedient, the relevant xsd documents could be revised and uploaded to jakarta.ee/xml/ns/faces (or something suitable) i.e. check them in here. At least, that would be consistent with other Jakarta EE Specs (JakartaEE, JSONB, JSONP, etc. Some IDEs do validate in real-time from the URL locations (Intellij for example).

BalusC commented 3 years ago

There are no XSD documents in first place. Hence the proposal to use URN instead of URL.

arjantijms commented 3 years ago

@edbratt Just to emphasise this, for the taglib URIs there are no XSD documents. Because it was the norm to use URLs for them, many people believed there were XSD documents backing them, but this is a totally different concept from say web.xml or faces-config.xml documents.

BalusC commented 3 years ago

Implemented now.

Jakarta Tags namespaces have also been remapped.

http://xmlns.jcp.org/jsp/jstl/core is now jakarta.tags.core http://xmlns.jcp.org/jsp/jstl/functions is now jakarta.tags.functions

All old namespaces retain their backwards compatibility.

tandraschko commented 3 years ago

@BalusC @arjantijms how do we handle JSTL? I mean, we only use the namespace but its implemented in the JSF actually (at least in MyFaces) I can only see a class usage of jakarta.servlet.jsp.jstl.sql.Result.

Could we just introduce our own namespace here for the JSTL tags? maybe something like "jakarta.faces.core.buildtime"?

We could then completely get rid of the jstl and JSP usage. Just a special case for supporting jakarta.servlet.jsp.jstl.sql.Result.

BalusC commented 3 years ago

Could we just introduce our own namespace here for the JSTL tags?

I've already coined jakarta.tags.core and jakarta.tags.functions: https://github.com/eclipse-ee4j/jstl-api/issues/144

Just a special case for supporting jakarta.servlet.jsp.jstl.sql.Result.

@arjantijms already removed it from UIData#getValue() javadoc during https://github.com/eclipse-ee4j/mojarra/issues/4775