[ 
https://issues.apache.org/jira/browse/ARTEMIS-3139?focusedWorklogId=786692&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-786692
 ]

ASF GitHub Bot logged work on ARTEMIS-3139:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Jun/22 16:17
            Start Date: 30/Jun/22 16:17
    Worklog Time Spent: 10m 
      Work Description: ryan-highley commented on code in PR #4122:
URL: https://github.com/apache/activemq-artemis/pull/4122#discussion_r911219489


##########
artemis-server/src/main/resources/schema/artemis-configuration.xsd:
##########
@@ -16,18 +16,23 @@
   limitations under the License.

Review Comment:
   And I understand your point. I work building large-scale production Artemis 
systems for clients every day--that's my job. I use modular files for common 
sections of broker.xml configurations extensively to build everything from 
cluster prototypes to multi-DC, world-wide messaging infrastructure.
   
   My point is simple. The XSD does not support modularity as well as it should 
due to the "anonymous" element and complexType definitions buried in the 
configurationType definition. This is bad XSD form as the embedded defined 
types and elements cannot be used directly--they're only useful in the context 
of the outermost defining type, the configurationType in this case.
   
   Moving these embedded elements and their associated complex types to 
top-level definitions enables XML tooling to recognize and support the schema 
definition in both modular files as they're being developed as well as complete 
broker.xml files. While the elements may not make sense outside a broker 
configuration, supporting modular files necessarily implies the elements 
therein are portable to those files. The same tooling support should be 
available in the modular files as is available when developing a monolithic 
broker.xml file.
   
   I agree the scale of this change involves significant risk. This is why I 
included additional updates to the existing xinclude unit tests to address that 
risk. If you would like to suggest additional test scenarios, I'm happy to 
include those as well.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 786692)
    Time Spent: 4h  (was: 3h 50m)

> Anonymous types in artemis-configuration.xsd
> --------------------------------------------
>
>                 Key: ARTEMIS-3139
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-3139
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Tuve Nordius
>            Priority: Major
>          Time Spent: 4h
>  Remaining Estimate: 0h
>
> The artemis-configuration.xsd has a lot of anonymous types which makes it 
> hard to create a modulirized configuration. If I want to have diverts in a 
> seperate file I can do that but I cant get any validation/ help for any 
> editor. 
> example:
> I can do in an included file diverts.xml something like 
> {code:java}
> <diverts xmlns="urn:activemq:core">{code}
> I would like to do like bellow, but I can't since divertsType does not exist 
> other as an inline anonymous type.
>  
> {code:java}
> <diverts xmlns="urn:activemq:core"
>          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>          xsi:schemaLocation="urn:activemq:core 
> /schema/artemis-configuration.xsd"
>          xsi:type="divertsType" >
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to