2 // Mono.Xml.XPath.DTMXPathDocument
5 // Atsushi Enomoto (ginga@kit.hi-ho.ne.jp)
7 // (C) 2003 Atsushi Enomoto
10 using System.Collections;
12 using System.Xml.XPath;
14 namespace Mono.Xml.XPath
17 public class DTMXPathDocument : IXPathNavigable
22 public DTMXPathDocument (XmlNameTable nameTable,
23 DTMXPathLinkedNode [] nodes,
24 DTMXPathAttributeNode [] attributes,
25 DTMXPathNamespaceNode [] namespaces,
28 this.nameTable = nameTable;
30 this.attributes = attributes;
31 this.namespaces = namespaces;
32 this.idTable = idTable;
39 public XPathNavigator CreateNavigator ()
42 root = new DTMXPathNavigator (this,
54 XmlNameTable nameTable;
56 // Root XPathNavigator.
57 DTMXPathNavigator root;
59 #region Immutable tree fields
61 DTMXPathLinkedNode [] nodes = new DTMXPathLinkedNode [0];
62 DTMXPathAttributeNode [] attributes = new DTMXPathAttributeNode [0];
63 DTMXPathNamespaceNode [] namespaces = new DTMXPathNamespaceNode [0];
65 // idTable [string value] -> int nodeId
66 readonly Hashtable idTable;