ppkarwasz commented on PR #1441:
URL: https://github.com/apache/logging-log4j2/pull/1441#issuecomment-2272812799

   > The new XSD incorrectly points out two problems:
   > 
   >     1. It doesn't like the way I've set the value for a Property: as 
content. However, that is one of the ways shown in the example at 
https://logging.apache.org/log4j/2.x/manual/configuration.html#concise-syntax. 
Currently, it will only validate if I set the value using the `value` attribute.
   
   This is a limitation of the current `log4j-docgen` version: it handles 
`@PluginValue` annotation the same way as `@PluginAttribute`. You can report it 
in the [`logging-log4j-tools` 
repo](https://github.com/apache/logging-log4j-tools/issues).
    
   >     2. More significantly, it does not accept "${root.logging.level}" for 
Root's `level`, which is using [Property 
Substitution](https://logging.apache.org/log4j/2.x/manual/configuration.html#PropertySubstitution).
   
   The generated schema doesn't play well with 
[arbiters](https://logging.apache.org/log4j/2.x/manual/configuration.html#arbiters)
 or property substitution expressions:
   
   - The former can be placed at any point in the XML tree. We could introduce 
support for them, but then we can not specify any restrictions on the content 
of an arbiter.
   - The latter can be placed in any XML attribute. We could declare each 
attribute as `xsd:string`, but this would IMHO strongly reduce the utility of 
the XSD. Right now a good XML editor can suggest you the type and possible 
values of most attributes (e.g. you don't need to remember the possible values 
of the `target` attribute of the console appender).
   
   We could add an option to `log4j-docgen-maven-plugin` to use `xsd:string` 
for all attribute, but we wouldn't use the option in the XSD schemas available 
on our site. @vy, what do you think?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to