diff --git a/manual/en-US/coding-standards/chapters/xml.md b/manual/en-US/coding-standards/chapters/xml.md new file mode 100644 index 00000000..e05c92cd --- /dev/null +++ b/manual/en-US/coding-standards/chapters/xml.md @@ -0,0 +1,57 @@ +## XML Files + +### Attributes + +* Each attribute is on its own line. +* The four attributes `name`, `type`, `label` and `description` should be written in this order and at the top of the element definition. + +### Closing Elements + +Elements should be closed with the closing tag on a new line. + +### Exception + +When the element only has few attributes, then the whole element can stay on the same line. +A max line length of 100 characters is recommended for good reading. + +#### Examples + +Element is **empty**: +```` + +```` + +Element is **not empty**: +```` + + + + + + + + + +```` diff --git a/manual/en-US/menu.md b/manual/en-US/menu.md index 25f0dce8..ce266484 100644 --- a/manual/en-US/menu.md +++ b/manual/en-US/menu.md @@ -5,6 +5,7 @@ - [Inline Code Comments](coding-standards/chapters/inline-comments.md) - [DocBlocks](coding-standards/chapters/docblocks.md) - [PHP Code](coding-standards/chapters/php.md) + - [XML](coding-standards/chapters/xml.md) - **Clientside Syntax Styleguides** - [HTML](coding-standards/chapters/html.md) - [CSS](coding-standards/chapters/css.md)