You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "krallus (via GitHub)" <gi...@apache.org> on 2024/08/08 23:59:09 UTC
[I] log4j-docgen: XSD generation doesn't allow @PluginValue annotated fields to be text content of the containing element [logging-log4j-tools]
krallus opened a new issue, #134:
URL: https://github.com/apache/logging-log4j-tools/issues/134
The [log4j-config-2.xsd](https://logging.apache.org/xml/ns/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:
```xml
<Property name="name2" value="value2"/>
```
but this is not valid:
```xml
<Property name="name1">value</property>
```
However, as seen [here](https://logging.apache.org/log4j/2.x/manual/configuration.html#concise-syntax), **both** are valid forms.
In [Property.java](https://github.com/apache/logging-log4j2/blob/main/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Property.java), `value` is annotated with `@PluginValue`. This is not the same as `@PluginAttribute`.
As implied in the description of [PluginValue.java](https://github.com/apache/logging-log4j2/blob/main/log4j-plugins/src/main/java/org/apache/logging/log4j/plugins/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).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] log4j-docgen: XSD generation doesn't allow @PluginValue annotated fields to be text content of the containing element [logging-log4j-tools]
Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on issue #134:
URL: https://github.com/apache/logging-log4j-tools/issues/134#issuecomment-2277225088
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org