Currently <xs:any> is only emitted for fields with type java.util.Properties or DOM (
|
else if ( Properties.class.getName().equals( field.getType() ) |
|
|| "DOM".equals( field.getType() ) ) |
|
{ |
|
writePropertiesElement( w ); |
|
} |
).
For the case of the Maven plugin descriptor the element configuration may contain children with arbitrary names (although in the Model it is incorrectly described as paramName, https://maven.apache.org/ref/3.8.6/maven-plugin-api/plugin.html#class_paramName).
The according MDO at https://github.com/apache/maven/blob/daa8e1690226fc385db3d448ad962997afe3dba8/maven-plugin-api/src/main/mdo/plugin.mdo#L340 just defines the placeholder paramName instead.
As XSD unfortunately doesn't support enforcing a complex type on elements with arbitrary names, the best one can come up with is xs:any.
I propose to support a value * for xml.tagName in https://codehaus-plexus.github.io/modello/modello.html#field which leads to allowing everything below in the XSD.
Currently
<xs:any>is only emitted for fields with typejava.util.PropertiesorDOM(modello/modello-plugins/modello-plugin-xsd/src/main/java/org/codehaus/modello/plugin/xsd/XsdGenerator.java
Lines 353 to 357 in 43aa6f4
For the case of the Maven plugin descriptor the element
configurationmay contain children with arbitrary names (although in the Model it is incorrectly described asparamName, https://maven.apache.org/ref/3.8.6/maven-plugin-api/plugin.html#class_paramName).The according MDO at https://github.com/apache/maven/blob/daa8e1690226fc385db3d448ad962997afe3dba8/maven-plugin-api/src/main/mdo/plugin.mdo#L340 just defines the placeholder
paramNameinstead.As XSD unfortunately doesn't support enforcing a complex type on elements with arbitrary names, the best one can come up with is
xs:any.I propose to support a value
*forxml.tagNamein https://codehaus-plexus.github.io/modello/modello.html#field which leads to allowing everything below in the XSD.