Skip to content

XSD Generator: Support emitting xs:any for fields not restricting the element name #264

@kwin

Description

@kwin

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions