[wildfly-dev] WildFly Client Configuration and schema

David M. Lloyd david.lloyd at redhat.com
Wed Jun 7 14:11:15 EDT 2017


Something that has come up in a JIRA issue [1] is the question of 
whether the WildFly Client Configuration file should use a schema for 
its root element.

The root of the "wildfly-client.xml" file is presently a single, 
namespace-less element named "configuration".  The content of this 
element is a sequence of library-specific configuration, like this:

<configuration>
     <discovery xmlns="urn:wildfly-discovery:1.0">
         <!-- content here -->
     </discovery>
     <jboss-ejb-client xmlns="urn:jboss:wildfly-client-ejb:3.0">
         <!-- content here -->
     </jboss-ejb-client>
     <!-- etc. -->
<configuration>

The question is, should there be a schema for that root element?  The 
entire schema would be something like:

<xs:element name="configuration" type="configuration-type"/>

<xs:complexType name="configuration-type">
     <xs:any maxOccurs="unbounded" namespace="##other"/>
</xs:complexType>

Then you'd have to put the configuration namespace in as well:

<configuration xmlns="urn:wildfly-client:1.0">
     <discovery xmlns="urn:wildfly-discovery:1.0">
         <!-- content here -->
     </discovery>
     <jboss-ejb-client xmlns="urn:jboss:wildfly-client-ejb:3.0">
         <!-- content here -->
     </jboss-ejb-client>
     <!-- etc. -->
</configuration>

WDYT?  Is it worth having a whole schema/namespace for a single element?

[1] https://issues.jboss.org/browse/ELY-1098
-- 
- DML


More information about the wildfly-dev mailing list