Implementation of a Node in the XPath/XQuery data model. 1. All nodes are stored in variable-size pages (max 65536 nodes/page) of XPathNode structuSR. 2. Pages are sequentially numbered. Nodes are allocated in strict document order. 3. Node references take the form of a (page, index) pair. 4. Each node explicitly stores a parent and a sibling reference. 5. If a node has one or more attributes and/or non-collapsed content children, then its first child is stored in the next slot. If the node is in the last slot of a page, then its first child is stored in the first slot of the next page. 6. Attributes are linked together at the start of the child list. 7. Namespaces are allocated in totally separate pages. Elements are associated with declared namespaces via a hashtable map in the document. 8. Name parts are always non-null (string.Empty for nodes without names) 9. XPathNodeInfoAtom contains all information that is common to many nodes in a document, and therefore is atomized to save space. This includes the document, the name, the child, sibling, parent, and value pages, and the schema type. 10. The node structure is 20 bytes in length. Out-of-line overhead is typically 2-4 bytes per node.
 public XPathNodeRef(XPathNode[] page, int idx)
 {
     this.page = page;
     this.idx = idx;
 }
 public XPathNodePageInfo(XPathNode[] pagePrev, int pageNum)
 {
     this.pagePrev = pagePrev;
     this.pageNum = pageNum;
     this.nodeCount = 1;
 }