private XPathNodeType QilConstructorToNodeType(QilNodeType typ) {
switch (typ) {
case QilNodeType.DocumentCtor: return XPathNodeType.Root;
case QilNodeType.ElementCtor: return XPathNodeType.Element;
case QilNodeType.TextCtor: return XPathNodeType.Text;
case QilNodeType.RawTextCtor: return XPathNodeType.Text;
case QilNodeType.PICtor: return XPathNodeType.ProcessingInstruction;
case QilNodeType.CommentCtor: return XPathNodeType.Comment;
case QilNodeType.AttributeCtor: return XPathNodeType.Attribute;
case QilNodeType.NamespaceDecl: return XPathNodeType.Namespace;
}
Debug.Assert(false, "Cannot map QilNodeType " + typ + " to an XPathNodeType");
return XPathNodeType.All;
}