FrameworkFork\Microsoft.Xml\Xml\Cache\XPathDocumentBuilder.cs (29)
26Text = XPathNodeType.Text,
27SignificantWhitespace = XPathNodeType.SignificantWhitespace,
28Whitespace = XPathNodeType.Whitespace,
102idx = NewNode(out page, XPathNodeType.Text, string.Empty, string.Empty, string.Empty, string.Empty);
112_idxParent = NewNode(out _pageParent, XPathNodeType.Root, string.Empty, string.Empty, string.Empty, baseUri);
157AddSibling(XPathNodeType.Element, localName, ns, prefix, baseUri);
209Debug.Assert(_pageParent[_idxParent].NodeType == XPathNodeType.Element);
284Debug.Assert(_idxParent == 0 || _pageParent[_idxParent].NodeType == XPathNodeType.Element);
285Debug.Assert(_idxSibling == 0 || _pageSibling[_idxSibling].NodeType == XPathNodeType.Attribute);
294AddSibling(XPathNodeType.Attribute, localName, namespaceName, prefix, string.Empty);
302Debug.Assert(_pageSibling[_idxSibling].NodeType == XPathNodeType.Attribute);
332AddSibling(XPathNodeType.Comment, string.Empty, string.Empty, string.Empty, string.Empty);
352AddSibling(XPathNodeType.ProcessingInstruction, name, string.Empty, string.Empty, baseUri);
440AddSibling(XPathNodeType.Text, string.Empty, string.Empty, string.Empty, string.Empty);
475Debug.Assert(_pageParent[_idxParent].NodeType == XPathNodeType.Element);
486Debug.Assert(_idxSibling == 0 || _pageSibling[_idxSibling].NodeType == XPathNodeType.Attribute);
489Debug.Assert(_idxParent == 0 || _pageParent[_idxParent].NodeType == XPathNodeType.Element);
622Debug.Assert(pageElem == null || pageElem[idxElem].NodeType == XPathNodeType.Element);
636pageNode[idxNode].Create(info, XPathNodeType.Namespace, idxElem);
647private int NewNode(out XPathNode[] page, XPathNodeType xptyp, string localName, string namespaceUri, string prefix, string baseUri)
652Debug.Assert(xptyp != XPathNodeType.Namespace);
719private void AddSibling(XPathNodeType xptyp, string localName, string namespaceUri, string prefix, string baseUri)
723Debug.Assert(xptyp != XPathNodeType.Root && xptyp != XPathNodeType.Namespace);
765AddSibling((XPathNodeType)textType, string.Empty, string.Empty, string.Empty, string.Empty);
889Debug.Assert((int)XPathNodeType.Text < (int)XPathNodeType.SignificantWhitespace);
890Debug.Assert((int)XPathNodeType.SignificantWhitespace < (int)XPathNodeType.Whitespace);
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathNodeHelper.cs (23)
30Debug.Assert(pageElem[idxElem].NodeType == XPathNodeType.Element);
47if (pageElem[idxElem].NodeType == XPathNodeType.Element)
79Debug.Assert(pageNode[idxNode].NodeType == XPathNodeType.Attribute);
96if (idx != 0 && page[idx].NodeType == XPathNodeType.Attribute)
120while (page[idx].NodeType == XPathNodeType.Attribute)
234if (page[idx].NodeType != XPathNodeType.Attribute)
259public static bool GetContentChild(ref XPathNode[] pageNode, ref int idxNode, XPathNodeType typ)
277if (typ == XPathNodeType.Attribute)
297public static bool GetContentSibling(ref XPathNode[] pageNode, ref int idxNode, XPathNodeType typ)
304if (page[idx].NodeType != XPathNodeType.Attribute)
315Debug.Assert(typ != XPathNodeType.Attribute && typ != XPathNodeType.Namespace);
335Debug.Assert(pageNode[idxNode].NodeType != XPathNodeType.Attribute);
376if (pagePrec[idxPrec].NodeType != XPathNodeType.Attribute)
399if (page[idx].NodeType != XPathNodeType.Attribute)
422public static bool GetPreviousContentSibling(ref XPathNode[] pageNode, ref int idxNode, XPathNodeType typ)
470while (idx != 0 && page[idx].NodeType == XPathNodeType.Attribute);
519if (page[idx].NodeType == XPathNodeType.Element && (object)page[idx].LocalName == (object)localName)
608public static bool GetContentFollowing(ref XPathNode[] pageCurrent, ref int idxCurrent, XPathNode[] pageEnd, int idxEnd, XPathNodeType typ)
614Debug.Assert(typ != XPathNodeType.Text, "Text should be handled by GetTextFollowing in order to take into account collapsed text.");
615Debug.Assert(page[idx].NodeType != XPathNodeType.Attribute, "Current node should never be an attribute or namespace--caller should handle this case.");
684if (page[idx].IsText || (page[idx].NodeType == XPathNodeType.Element && page[idx].HasCollapsedText))
695if (page[idx].IsText || (page[idx].NodeType == XPathNodeType.Element && page[idx].HasCollapsedText))
FrameworkFork\Microsoft.Xml\Xml\ValidateNames.cs (12)
467internal static void ValidateNameThrow(string prefix, string localName, string ns, XPathNodeType nodeKind, Flags flags)
478internal static bool ValidateName(string prefix, string localName, string ns, XPathNodeType nodeKind, Flags flags)
489private static bool ValidateNameInternal(string prefix, string localName, string ns, XPathNodeType nodeKind, Flags flags, bool throwOnError)
514case XPathNodeType.Element:
523case XPathNodeType.Attribute:
530goto case XPathNodeType.Element;
532case XPathNodeType.ProcessingInstruction:
557case XPathNodeType.Element:
558case XPathNodeType.Attribute:
559case XPathNodeType.Namespace:
572if (prefix.Length == 0 && nodeKind == XPathNodeType.Attribute)
602case XPathNodeType.ProcessingInstruction:
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigator.cs (113)
129case XPathNodeType.Element:
130case XPathNodeType.Attribute:
457if (NodeType != XPathNodeType.Element)
490if (NodeType != XPathNodeType.Element)
526XPathNodeType nt = NodeType;
527if ((nt != XPathNodeType.Element && scope != XmlNamespaceScope.Local) || nt == XPathNodeType.Attribute || nt == XPathNodeType.Namespace)
576public abstract XPathNodeType NodeType { get; }
610case XPathNodeType.Root:
611case XPathNodeType.Element:
729case XPathNodeType.Attribute:
730case XPathNodeType.Namespace:
761if (NodeType == XPathNodeType.Element && localName == LocalName && namespaceURI == NamespaceURI)
771public virtual bool MoveToChild(XPathNodeType type)
802case XPathNodeType.Attribute:
803case XPathNodeType.Namespace:
813case XPathNodeType.Attribute:
814case XPathNodeType.Namespace:
850while (NodeType != XPathNodeType.Element
857public virtual bool MoveToFollowing(XPathNodeType type)
862public virtual bool MoveToFollowing(XPathNodeType type, XPathNavigator end)
871case XPathNodeType.Attribute:
872case XPathNodeType.Namespace:
882case XPathNodeType.Attribute:
883case XPathNodeType.Namespace:
930if (NodeType == XPathNodeType.Element && localName == LocalName && namespaceURI == NamespaceURI)
937public virtual bool MoveToNext(XPathNodeType type)
1053case XPathNodeType.Root:
1060case XPathNodeType.Element:
1077case XPathNodeType.Attribute:
1098Debug.Assert(schemaType != null || this.NodeType == XPathNodeType.Root, "schemaType != null || this.NodeType == XPathNodeType.Root");
1291public virtual XPathNodeIterator SelectChildren(XPathNodeType type)
1301public virtual XPathNodeIterator SelectAncestors(XPathNodeType type, bool matchSelf)
1311public virtual XPathNodeIterator SelectDescendants(XPathNodeType type, bool matchSelf)
1371XPathNodeType type = NodeType;
1372if (type == XPathNodeType.Root
1373|| type == XPathNodeType.Attribute
1374|| type == XPathNodeType.Namespace)
1403if (NodeType == XPathNodeType.Attribute)
1407else if (NodeType == XPathNodeType.Namespace)
1448case XPathNodeType.Root:
1449case XPathNodeType.Element:
1481case XPathNodeType.Attribute:
1482case XPathNodeType.Namespace:
1498case XPathNodeType.Root:
1499case XPathNodeType.Element:
1510case XPathNodeType.Attribute:
1724if (NodeType == XPathNodeType.Element && (object)localName == (object)LocalName && namespaceURI == NamespaceURI)
1732internal bool MoveToPrevious(XPathNodeType type)
1750if (NodeType == XPathNodeType.Root)
1765case XPathNodeType.Attribute:
1766case XPathNodeType.Namespace:
1800case XPathNodeType.Attribute:
1806case XPathNodeType.Namespace:
1923case XPathNodeType.Namespace:
1925case XPathNodeType.Attribute:
1934case XPathNodeType.Namespace:
1946case XPathNodeType.Attribute:
1991internal const int NoAttrNmspMask = AllMask & ~(1 << (int)XPathNodeType.Attribute) & ~(1 << (int)XPathNodeType.Namespace);
1992internal const int TextMask = (1 << (int)XPathNodeType.Text) | (1 << (int)XPathNodeType.SignificantWhitespace) | (1 << (int)XPathNodeType.Whitespace);
1994(1 << (int) XPathNodeType.Root), // Root
1995(1 << (int) XPathNodeType.Element), // Element
1999(1 << (int) XPathNodeType.SignificantWhitespace), // SignificantWhitespace
2000(1 << (int) XPathNodeType.Whitespace), // Whitespace
2001(1 << (int) XPathNodeType.ProcessingInstruction), // ProcessingInstruction
2002(1 << (int) XPathNodeType.Comment), // Comment
2006internal static int GetContentKindMask(XPathNodeType type)
2011internal static int GetKindMask(XPathNodeType type)
2013if (type == XPathNodeType.All)
2015else if (type == XPathNodeType.Text)
2021internal static bool IsText(XPathNodeType type)
2024return (uint)(type - XPathNodeType.Text) <= (XPathNodeType.Whitespace - XPathNodeType.Text);
2028private bool IsValidChildType(XPathNodeType type)
2032case XPathNodeType.Root:
2035case XPathNodeType.Element:
2036case XPathNodeType.SignificantWhitespace:
2037case XPathNodeType.Whitespace:
2038case XPathNodeType.ProcessingInstruction:
2039case XPathNodeType.Comment:
2043case XPathNodeType.Element:
2046case XPathNodeType.Element:
2047case XPathNodeType.Text:
2048case XPathNodeType.SignificantWhitespace:
2049case XPathNodeType.Whitespace:
2050case XPathNodeType.ProcessingInstruction:
2051case XPathNodeType.Comment:
2060private bool IsValidSiblingType(XPathNodeType type)
2064case XPathNodeType.Element:
2065case XPathNodeType.Text:
2066case XPathNodeType.SignificantWhitespace:
2067case XPathNodeType.Whitespace:
2068case XPathNodeType.ProcessingInstruction:
2069case XPathNodeType.Comment:
2072case XPathNodeType.Element:
2073case XPathNodeType.Text:
2074case XPathNodeType.SignificantWhitespace:
2075case XPathNodeType.Whitespace:
2076case XPathNodeType.ProcessingInstruction:
2077case XPathNodeType.Comment:
2252case XPathNodeType.Element:
2255case XPathNodeType.Attribute:
2256case XPathNodeType.Namespace:
2257case XPathNodeType.ProcessingInstruction:
2261case XPathNodeType.Text:
2262case XPathNodeType.Whitespace:
2263case XPathNodeType.SignificantWhitespace:
2264case XPathNodeType.Comment: