[jboss-dev] jboss_5_0.xsd is very confused

Adrian Brock abrock at redhat.com
Tue Apr 22 11:40:41 EDT 2008


If you look at dd validator test in the testsuite
it is failing because of an unexpected namespace:
http://hudson.jboss.org/hudson/job/JBoss-AS-5.0.x-TestSuite-sun15/533/testReport/org.jboss.test.xml/DDValidatorUnitTestCase/testJBossXml/

Expected http://www.jboss.com/xml/ns/javaee', but the target namespace
of the schema document is 'http://java.sun.com/xml/ns/javaee'.

The actual xml is here:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/testsuite/src/resources/refs/jboss.xml?revision=68900&view=markup
which references:

<jboss xmlns="http://www.jboss.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
    version="3.0">

If I look in JBossEntityResolver there is no mention of this namespace:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/common/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java?revision=2799&view=markup
but there is a reference to:
registerEntity("http://www.jboss.org/j2ee/schema/jboss_5_0.xsd", "jboss_5_0.xsd");

Since the schemas don't match, the resolution is actually going here:
http://www.jboss.org/j2ee/schema/jboss_5_0.xsd
which is a very old and broken schema created by the EJB3 team in the wrong namespace.

So I think there are two fixes required:
1) Correct the namespace in the registerEntry of JBossEntityResolver for jboss_5_0.xsd
2) Update the correct/latest schema to www.jboss.org which can be found here:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/metadata/trunk/src/main/resources/schema/jboss_5_0.xsd?revision=72036&view=markup

NOTE: The test should pass with just (1) fixed since we shouldn't be going to the website
to resolve schemas.
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list