XWiki XML Files Code Style

Last modified by Lucas Charpentier (Sereza7) on 2023/11/29 11:19

XWiki XML Files should follow these rules:

  • Have a proper License header
  • Use xwiki:XWiki.Admin as the author, contentauthor and creator
  • Use 1.1 as the version
  • Use false for minoredit
  • Have an empty defaultLanguage entry
  • Have an empty comment entry
  • Indent the XML using 2 characters for indentation
  • Set a mime type for attachments
  • Must not include date, creationDate, contentUpdateDate or attachment date fields
  • Avoid using H1 in the content in order to provide the best heading hierarchy (all page content is under the page title in this hierarchy).

This cleanup can be done automatically, by using the "mvn xar:format" Maven command, see Generating a XAR for your build.

Get Connected