users@javaserverfaces-spec-public.java.net

[jsr344-experts mirror] [jsr344-experts] Re: [1169-NewXmlns] Mandatory compliance

From: Michael Müller <michael.mueller_at_mueller-bruehl.de>
Date: Wed, 27 Feb 2013 22:00:59 +0100

Am 27.02.2013 20:15, schrieb Edward Burns:
> Hello Volunteers,
>
> In a move designed to demonstrate our commitment to community, and
> showcase the independence of our technology from any one company, all
> newly created XML namespaced artifacts in JSF 2.2 must use the new
> xmlns.jcp.org namespace instead of java.sun.com. For example, the
> faces-config.xml schema will be <http://xmlns.jcp.org/xml/ns/javaee>
> instead of <http://java.sun.com/xml/ns/javaee>.
All newly created... ok
>
> This change impacts two areas: 1. XML files. 2. Facelet Taglib URIs
>
> SETION: 1. XML Files
>
> Any XSD ending with _2_2.xsd will have the new namespace applied.
>
> This diff exemplifies this sort of change.
>
> 8<------------------------------
> Index: web-facesconfig_2_2.xsds
> ===================================================================
> --- web-facesconfig_2_2.xsds (revision 59386)
> +++ web-facesconfig_2_2.xsds (revision 59387)
> @@ -1,12 +1,12 @@
> <?xml version="1.0" encoding="utf-8" ?>
> -<xsd:schema xmlns:javaee="http://java.sun.com/xml/ns/javaee" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://java.sun.com/xml/ns/javaee" version="2.2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> +<xsd:schema xmlns:javaee="http://xmlns.jcp.org/xml/ns/javaee" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://xmlns.jcp.org/xml/ns/javaee" version="2.2" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:include schemaLocation="javaee_7.xsd" />
> <xsd:annotation>
> <xsd:documentation>
>
> DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
>
> - Copyright (c) 2011 - 2012 Oracle and/or its affiliates. All rights reserved.
> + Copyright (c) 2011 - 2013 Oracle and/or its affiliates. All rights reserved.
>
> The contents of this file are subject to the terms of either the GNU
> General Public License Version 2 only ("GPL") or the Common Development
> @@ -55,12 +55,12 @@
> the JavaServer Faces schema by indicating the JavaServer
> Faces namespace:</p>
>
> - <p>http://java.sun.com/xml/ns/javaee</p>
> + <p>http://xmlns.jcp.org/xml/ns/javaee</p>
>
> <p>and by indicating the version of the schema by
> using the version element as shown below:</p>
>
> - <pre>&lt;faces-config xmlns="http://java.sun.com/xml/ns/javaee"
> + <pre>&lt;faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="..."
> version="2.2"&gt;
> @@ -71,7 +71,7 @@
> version of the schema using xsi:schemaLocation attribute
> for javaee namespace with the following location:</p>
>
> - <p>http://java.sun.com/xml/ns/javaee/web-facesconfig_2_2.xsd</p>
> + <p>http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd</p>
>
> ]]>
> </xsd:documentation>
> 8<------------------------------
>
> The complete list of files impacted is:
>
> web-facelettaglibrary_2_2.xsd
> web-facesconfig_2_2.xsd
> web-partialresponse_2_2.xsd
>
> SECTION: 2. Facelet Taglib URIs
>
> Consider the Facelet VDLdocs at [1]. The following libraries are new in
> 2.2, and will only have the new namespace.
>
> Library URI
> ------- ---
> Pass Through Attributes http://xmlns.jcp.org/jsf/passthrough
> Pass Through Elements http://xmlns.jcp.org/jsf
>
> The remaining libraries are pre-existing and will respond to both the
> old and the new namespace.
>
> Library OLD URI NEW URI
> ------- ------- -------
> Composite Components http://java.sun.com/jsf/composite http://xmlns.jcp.org/jsf/composite
> Faces Core http://java.sun.com/jsf/core http://xmlns.jcp.org/jsf/core
> h http://java.sun.com/jsf/html http://xmlns.jcp.org/jsf/html
> JSTL core http://java.sun.com/jsp/jstl/core http://xmlns.jcp.org/jsp/jstl/core
> JSTL functions http://java.sun.com/jsp/jstl/functions http://xmlns.jcp.org/jsp/jstl/functions
> Facelets Templating http://java.sun.com/jsf/facelets http://xmlns.jcp.org/jsf/facelets
A bit of work for the implementors, but I guess this should be no problem.

It is important for any web developer to keep existing interfaces - at
least for a while. To keep existing systems running.
Will the old schema become deprecated one day (and maybe get removed
after a couple of years)?

Will it be possible to mix both naming conventions. e.g.
<html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://xmlns.jcp.org/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core">
Or, if the developer uses the new naming convention in one document, she
has to update all within the same file (no mixing) to force a smooth
migration?

> Please let me know if you have any comments about this.
>
> Ed

Herzliche Grüße - Best Regards,
Michael Müller