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
16 #if OUTSIDE_SYSTEM_XML
21 class DTMXPathDocument : IXPathNavigable
26 public DTMXPathDocument (XmlNameTable nameTable,
27 DTMXPathLinkedNode [] nodes,
28 DTMXPathAttributeNode [] attributes,
29 DTMXPathNamespaceNode [] namespaces,
32 this.nameTable = nameTable;
34 this.attributes = attributes;
35 this.namespaces = namespaces;
36 this.idTable = idTable;
43 public XPathNavigator CreateNavigator ()
46 root = new DTMXPathNavigator (this,
58 XmlNameTable nameTable;
60 // Root XPathNavigator.
61 DTMXPathNavigator root;
63 #region Immutable tree fields
65 DTMXPathLinkedNode [] nodes = new DTMXPathLinkedNode [0];
66 DTMXPathAttributeNode [] attributes = new DTMXPathAttributeNode [0];
67 DTMXPathNamespaceNode [] namespaces = new DTMXPathNamespaceNode [0];
69 // idTable [string value] -> int nodeId
70 readonly Hashtable idTable;