Skip to content

log4j-docgen: XSD generation doesn't allow @PluginValue annotated fields to be text content of the containing element #134

@krallus

Description

@krallus

The log4j-config-2.xsd file generated by log4j-docgen and located at https://logging.apache.org/xml/ns/ does not allow for the <Property> element in log4j2.xml to contain a value as text content.

Using the generated XSD, this is valid:

<Property name="name2" value="value2"/>

but this is not valid:

<Property name="name1">value</property>

However, as seen here, both are valid forms.

In Property.java, value is annotated with @PluginValue. This is not the same as @PluginAttribute.

As implied in the description of PluginValue.java, the configuration for such an annotated field does not distinguish between attribute and "value" (text content), and so XSD generation of such annotated fields should allow for both (or, ideally, exclusively one or the other).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions