_initialize (doc, props) {
    this.document = doc

    super._initialize(props)

    /**
     * Experimental:
     * Provides an XPathNode that leads back to the root.
     * An XPath of a DocumentNode is a sequence of XPathNodes, where the first one contains a node id as entry point
     * followed by zero or more nodes with property and position.
     * For example, the xpath for the second paragraph in a document's body could look like this [{id: 'article'}, { property: 'body', pos: 2 }]
     */
    this._xpath = new XPathNode(this.id, this.type)
  }
Base node type for document nodes.

  @example

  The following example shows how a new node type is defined.

  ```js
  class Todo extends DocumentNode {
    define () {
      return {
        type: 'todo',
        content: 'text',
        done: { type: 'bool', default: false }
      }
    }
  }
  ```

  The following data types are supported:

  - `string` bare metal string data type
  - `text` a string that carries annotations
  - `number` numeric values
  - `bool` boolean values
  - `id` a node id referencing another node in the document