Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
krallus opened this issue Aug 8, 2024 · 1 comment
Labels

Comments

@krallus
Copy link

krallus commented Aug 8, 2024

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).

@ppkarwasz
Copy link
Contributor

Thanks,

I'll add this to my TODO list.

Note: the documentation page will also change, since we have been strongly relying on the generated XSD to rewrite the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants