Protected properties are repository controlled so you really can't define custom node types with them. That's because the repository has to be able to know how to set them internally, and it won't know how to set the value of your custom protected property.
Perhaps the documentation was not clear; it was trying to say that when the "protected" attribute is absent from the property definition, then clients can set the property.
See the following section of the JCR 2.0 specification:
If an item I is declared protected it is repository-controlled.
If I is a node then, through the core write methods of JCR (see §10.2 Core Write
- I cannot be removed,
- child nodes of I cannot be added, removed, or reordered,
- properties of I cannot be added or removed,
- the values of existing properties of I cannot be changed,
- the primary node type of I cannot be changed and
- mixin node types cannot be added to or removed from I.
If I is a property then, through the core write methods of JCR (see §10.2 Core Write Methods),
- I cannot be removed and
- the value of I cannot be changed.
Additionally, if I is a property, its being repository-controlled also implies that its value is under the control of the repository and can change at any time, before or after save. See §188.8.131.52.2 Auto-Created and Protected.