[cdi-dev] [JBoss JIRA] (CDI-717) Element mistakenly removed from beans_2_0.xsd

Matej Novotny (JIRA) issues at jboss.org
Tue Sep 26 10:39:00 EDT 2017


Matej Novotny created CDI-717:
---------------------------------

             Summary: Element mistakenly removed from beans_2_0.xsd
                 Key: CDI-717
                 URL: https://issues.jboss.org/browse/CDI-717
             Project: CDI Specification Issues
          Issue Type: Bug
    Affects Versions: 2.0 .Final
            Reporter: Matej Novotny


While creating and editing {{beans_2_0.xsd}} there was one line removed as part of [this PR|https://github.com/cdi-spec/cdi/pull/348]. This line is present in {{beans_1_1.xsd}} -> [see the code|https://github.com/cdi-spec/cdi/blob/master/api/src/main/resources/beans_1_1.xsd#L83].

To sum up the meaning of this line, it allows presence of any other non-defined element from _other namespace (than target namespace)_ and further on enforces validation of such element against corresponding XSD.

As a consequence of this change, following {{beans.xml}} is valid with CDI 1.2 ({{beans_1_1.xsd}}) but no longer against CDI 2.0 ({{beans_2_0.xsd}}):
{code}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:weld="http://jboss.org/schema/weld/beans"
       xmlns="http://xmlns.jcp.org/xml/ns/javaee"
       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
        http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
       bean-discovery-mode="all">
    <weld:scan>
        <weld:include name="my.package.*"/>
    </weld:scan>
</beans>
{code}




--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the cdi-dev mailing list