Node type documentation

Started expanding the node type chapter.
I like the idea.

I'm not sure about the PHP version, but I think its doable.

The XML version is doable as well but does get a quit verbose. I got an
example on my blog:
http://blog.willem-jan.net/2014/01/18/creating-custom-nodetypes/
On 12 Jul 2014 17:17, "dantleech" <notifications@github.com> wrote:

> In book/node_types.rst:
>
> > +define which items (properties or child nodes) a node may or may not have. It
> > +allows you to apply constraints to these items and to specify if items should
> > +be automatically created when the node is created.
> > +
> > +Node types can be defined as classes or as CND files. CND is an abbreviation
> > +for Compact Namespace and Node Type Definition, and is part of the JCR-283
> > +specification. This tutorial will show examples using both the class and CND
> > +formats.
> > +
> > +An Example
> > +----------
> > +
> > +As an example we will define the node types required by a canonical blog
> > +application.
> > +
> > +.. configuration-block::
>
> I thought it would be cool to list the examples in all the available
> formats, as with the Symfony documentation. But I have some questions:
>
>    - Is it practical to list PHP examples? Is it possible to define a
>    node type (with property and child node definitions) in a single PHP file -
>    or would we have to list a class for each definition? This would be far too
>    verbose.
>    - Are there any other formats that can be readily used with PHPCR
>    other than CND? Such as XML?
>
> @dbu <https://github.com/dbu> @lsmith77 <https://github.com/lsmith77>
> @wjzijderveld <https://github.com/wjzijderveld>
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/phpcr/phpcr-docs/pull/9/files#r14853616>.
>