File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed
coding-standards/chapters Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ ## XML Files
2+
3+ ### Attributes
4+
5+ * Each attribute is on its own line.
6+ * The four attributes ` name ` , ` type ` , ` label ` and ` description ` should be written in this order and at the top of the element definition.
7+
8+ ### Closing Elements
9+
10+ Elements should be closed with the closing tag on a new line.
11+
12+ ### Exception
13+
14+ When the element only has few attributes, then the whole element can stay on the same line.
15+ A max line length of 100 characters is recommended for good reading.
16+
17+ #### Examples
18+
19+ Element is ** empty** :
20+ ````
21+ <field
22+ name="abc"
23+ type="text"
24+ label="Empty Field"
25+ description="Empty field without options"
26+ />
27+ ````
28+
29+ Element is ** not empty** :
30+ ````
31+ <field
32+ name="abc"
33+ type="radio"
34+ label="Field"
35+ description="Field with options"
36+ >
37+ <option value="1">JYES</option>
38+ <option value="0">JNO</option>
39+ </field>
40+
41+ <field
42+ name="abc"
43+ type="radio"
44+ label="Field"
45+ description="Field with options"
46+ >
47+ <option
48+ value="1"
49+ foo="bar"
50+ >
51+ SOMETHING_VERY_LONG
52+ </option>
53+ <option value="0">
54+ SOMETHING_VERY_LONG
55+ </option>
56+ </field>
57+ ````
Original file line number Diff line number Diff line change 55 - [ Inline Code Comments] ( coding-standards/chapters/inline-comments.md )
66 - [ DocBlocks] ( coding-standards/chapters/docblocks.md )
77 - [ PHP Code] ( coding-standards/chapters/php.md )
8+ - [ XML] ( coding-standards/chapters/xml.md )
89- ** Clientside Syntax Styleguides**
910 - [ HTML] ( coding-standards/chapters/html.md )
1011 - [ CSS] ( coding-standards/chapters/css.md )
You can’t perform that action at this time.
0 commit comments