[
https://issues.apache.org/jira/browse/ARTEMIS-3139?focusedWorklogId=786613&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-786613
]
ASF GitHub Bot logged work on ARTEMIS-3139:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 30/Jun/22 14:17
Start Date: 30/Jun/22 14: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_r911084581
##########
artemis-server/src/main/resources/schema/artemis-configuration.xsd:
##########
@@ -16,18 +16,23 @@
limitations under the License.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns="urn:activemq:core"
targetNamespace="urn:activemq:core"
attributeFormDefault="unqualified"
elementFormDefault="qualified"
version="1.0">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="xml.xsd"/>
+ <xsd:import namespace="http://www.w3.org/2001/XInclude"
schemaLocation="XInclude.xsd"/>
<xsd:element name="core" type="configurationType"/>
<xsd:complexType name="configurationType">
<xsd:all>
+
+ <xsd:element ref="xi:include" maxOccurs="1" minOccurs="0"/>
Review Comment:
{{<xi:include>}} is not currently a valid element in {{configurationType}},
leading syntax validation tooling to balk. Including this element ref is the
reason for adding the XInclude.xsd file.
XSD 1.0 only allows {{all}} groups to have {{minOccurs == 0}} and
{{maxOccurs == 1}}, while valid configurations of course could have multiple
included element files. XSD 1.1 drops this restriction but including an XSD 1.1
validator turned out to be exceedingly painful.
Issue Time Tracking
-------------------
Worklog Id: (was: 786613)
Time Spent: 1h 50m (was: 1h 40m)
> 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: 1h 50m
> 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)