System\Xml\Cache\XPathDocumentBuilder.cs (29)
27Text = XPathNodeType.Text,
28SignificantWhitespace = XPathNodeType.SignificantWhitespace,
29Whitespace = XPathNodeType.Whitespace,
100idx = NewNode(out page, XPathNodeType.Text, string.Empty, string.Empty, string.Empty, string.Empty);
109this.idxParent = NewNode(out this.pageParent, XPathNodeType.Root, string.Empty, string.Empty, string.Empty, baseUri);
149AddSibling(XPathNodeType.Element, localName, ns, prefix, baseUri);
196Debug.Assert(this.pageParent[this.idxParent].NodeType == XPathNodeType.Element);
264Debug.Assert(this.idxParent == 0 || this.pageParent[this.idxParent].NodeType == XPathNodeType.Element);
265Debug.Assert(this.idxSibling == 0 || this.pageSibling[this.idxSibling].NodeType == XPathNodeType.Attribute);
273AddSibling(XPathNodeType.Attribute, localName, namespaceName, prefix, string.Empty);
280Debug.Assert(this.pageSibling[this.idxSibling].NodeType == XPathNodeType.Attribute);
307AddSibling(XPathNodeType.Comment, string.Empty, string.Empty, string.Empty, string.Empty);
325AddSibling(XPathNodeType.ProcessingInstruction, name, string.Empty, string.Empty, baseUri);
402AddSibling(XPathNodeType.Text, string.Empty, string.Empty, string.Empty, string.Empty);
433Debug.Assert(this.pageParent[this.idxParent].NodeType == XPathNodeType.Element);
443Debug.Assert(this.idxSibling == 0 || this.pageSibling[this.idxSibling].NodeType == XPathNodeType.Attribute);
446Debug.Assert(this.idxParent == 0 || this.pageParent[this.idxParent].NodeType == XPathNodeType.Element);
566Debug.Assert(pageElem == null || pageElem[idxElem].NodeType == XPathNodeType.Element);
580pageNode[idxNode].Create(info, XPathNodeType.Namespace, idxElem);
591private int NewNode(out XPathNode[] page, XPathNodeType xptyp, string localName, string namespaceUri, string prefix, string baseUri) {
595Debug.Assert(xptyp != XPathNodeType.Namespace);
656private void AddSibling(XPathNodeType xptyp, string localName, string namespaceUri, string prefix, string baseUri) {
659Debug.Assert(xptyp != XPathNodeType.Root && xptyp != XPathNodeType.Namespace);
697AddSibling((XPathNodeType) textType, string.Empty, string.Empty, string.Empty, string.Empty);
807Debug.Assert((int) XPathNodeType.Text < (int) XPathNodeType.SignificantWhitespace);
808Debug.Assert((int) XPathNodeType.SignificantWhitespace < (int) XPathNodeType.Whitespace);
System\Xml\Cache\XPathNodeHelper.cs (23)
30Debug.Assert(pageElem[idxElem].NodeType == XPathNodeType.Element);
46if (pageElem[idxElem].NodeType == XPathNodeType.Element) {
73Debug.Assert(pageNode[idxNode].NodeType == XPathNodeType.Attribute);
89if (idx != 0 && page[idx].NodeType == XPathNodeType.Attribute) {
110while (page[idx].NodeType == XPathNodeType.Attribute) {
212if (page[idx].NodeType != XPathNodeType.Attribute) {
234public static bool GetContentChild(ref XPathNode[] pageNode, ref int idxNode, XPathNodeType typ) {
248if (typ == XPathNodeType.Attribute)
268public static bool GetContentSibling(ref XPathNode[] pageNode, ref int idxNode, XPathNodeType typ) {
274if (page[idx].NodeType != XPathNodeType.Attribute) {
282Debug.Assert(typ != XPathNodeType.Attribute && typ != XPathNodeType.Namespace);
301Debug.Assert(pageNode[idxNode].NodeType != XPathNodeType.Attribute);
338if (pagePrec[idxPrec].NodeType != XPathNodeType.Attribute) {
359if (page[idx].NodeType != XPathNodeType.Attribute) {
379public static bool GetPreviousContentSibling(ref XPathNode[] pageNode, ref int idxNode, XPathNodeType typ) {
420while (idx != 0 && page[idx].NodeType == XPathNodeType.Attribute);
465if (page[idx].NodeType == XPathNodeType.Element && (object) page[idx].LocalName == (object) localName) {
545public static bool GetContentFollowing(ref XPathNode[] pageCurrent, ref int idxCurrent, XPathNode[] pageEnd, int idxEnd, XPathNodeType typ) {
550Debug.Assert(typ != XPathNodeType.Text, "Text should be handled by GetTextFollowing in order to take into account collapsed text.");
551Debug.Assert(page[idx].NodeType != XPathNodeType.Attribute, "Current node should never be an attribute or namespace--caller should handle this case.");
611if (page[idx].IsText || (page[idx].NodeType == XPathNodeType.Element && page[idx].HasCollapsedText))
620if (page[idx].IsText || (page[idx].NodeType == XPathNodeType.Element && page[idx].HasCollapsedText))
System\Xml\ValidateNames.cs (12)
452internal static void ValidateNameThrow(string prefix, string localName, string ns, XPathNodeType nodeKind, Flags flags) {
462internal static bool ValidateName(string prefix, string localName, string ns, XPathNodeType nodeKind, Flags flags) {
472private static bool ValidateNameInternal(string prefix, string localName, string ns, XPathNodeType nodeKind, Flags flags, bool throwOnError) {
493case XPathNodeType.Element:
501case XPathNodeType.Attribute:
507goto case XPathNodeType.Element;
509case XPathNodeType.ProcessingInstruction:
531case XPathNodeType.Element:
532case XPathNodeType.Attribute:
533case XPathNodeType.Namespace:
543if (prefix.Length == 0 && nodeKind == XPathNodeType.Attribute) {
568case XPathNodeType.ProcessingInstruction:
System\Xml\XPath\XPathNavigator.cs (113)
106case XPathNodeType.Element:
107case XPathNodeType.Attribute:
363if (NodeType != XPathNodeType.Element) {
393if (NodeType != XPathNodeType.Element) {
424XPathNodeType nt = NodeType;
425if ((nt != XPathNodeType.Element && scope != XmlNamespaceScope.Local) || nt == XPathNodeType.Attribute || nt == XPathNodeType.Namespace) {
470public abstract XPathNodeType NodeType { get; }
499case XPathNodeType.Root:
500case XPathNodeType.Element:
604case XPathNodeType.Attribute:
605case XPathNodeType.Namespace:
632if (NodeType == XPathNodeType.Element && localName == LocalName && namespaceURI == NamespaceURI)
642public virtual bool MoveToChild(XPathNodeType type) {
666case XPathNodeType.Attribute:
667case XPathNodeType.Namespace:
676case XPathNodeType.Attribute:
677case XPathNodeType.Namespace:
707while (NodeType != XPathNodeType.Element
714public virtual bool MoveToFollowing(XPathNodeType type) {
718public virtual bool MoveToFollowing(XPathNodeType type, XPathNavigator end) {
724case XPathNodeType.Attribute:
725case XPathNodeType.Namespace:
734case XPathNodeType.Attribute:
735case XPathNodeType.Namespace:
774if (NodeType == XPathNodeType.Element && localName == LocalName && namespaceURI == NamespaceURI)
781public virtual bool MoveToNext(XPathNodeType type) {
878case XPathNodeType.Root:
884case XPathNodeType.Element:
898case XPathNodeType.Attribute:
917Debug.Assert( schemaType != null || this.NodeType == XPathNodeType.Root, "schemaType != null || this.NodeType == XPathNodeType.Root" );
1080public virtual XPathNodeIterator SelectChildren( XPathNodeType type ) {
1088public virtual XPathNodeIterator SelectAncestors( XPathNodeType type, bool matchSelf ) {
1096public virtual XPathNodeIterator SelectDescendants( XPathNodeType type, bool matchSelf ) {
1143XPathNodeType type = NodeType;
1144if (type == XPathNodeType.Root
1145|| type == XPathNodeType.Attribute
1146|| type == XPathNodeType.Namespace) {
1170if (NodeType == XPathNodeType.Attribute) {
1173else if (NodeType == XPathNodeType.Namespace) {
1207case XPathNodeType.Root:
1208case XPathNodeType.Element:
1236case XPathNodeType.Attribute:
1237case XPathNodeType.Namespace:
1250case XPathNodeType.Root:
1251case XPathNodeType.Element:
1260case XPathNodeType.Attribute:
1436if (NodeType == XPathNodeType.Element && (object) localName == (object) LocalName && namespaceURI == NamespaceURI)
1444internal bool MoveToPrevious(XPathNodeType type) {
1459if (NodeType == XPathNodeType.Root)
1473case XPathNodeType.Attribute:
1474case XPathNodeType.Namespace:
1503case XPathNodeType.Attribute:
1508case XPathNodeType.Namespace:
1610case XPathNodeType.Namespace:
1612case XPathNodeType.Attribute:
1620case XPathNodeType.Namespace:
1629case XPathNodeType.Attribute:
1666internal const int NoAttrNmspMask = AllMask & ~(1 << (int) XPathNodeType.Attribute) & ~(1 << (int) XPathNodeType.Namespace);
1667internal const int TextMask = (1 << (int) XPathNodeType.Text) | (1 << (int) XPathNodeType.SignificantWhitespace) | (1 << (int) XPathNodeType.Whitespace);
1669(1 << (int) XPathNodeType.Root), // Root
1670(1 << (int) XPathNodeType.Element), // Element
1674(1 << (int) XPathNodeType.SignificantWhitespace), // SignificantWhitespace
1675(1 << (int) XPathNodeType.Whitespace), // Whitespace
1676(1 << (int) XPathNodeType.ProcessingInstruction), // ProcessingInstruction
1677(1 << (int) XPathNodeType.Comment), // Comment
1681internal static int GetContentKindMask(XPathNodeType type) {
1685internal static int GetKindMask(XPathNodeType type) {
1686if (type == XPathNodeType.All)
1688else if (type == XPathNodeType.Text)
1694internal static bool IsText(XPathNodeType type) {
1696return (uint)(type - XPathNodeType.Text) <= (XPathNodeType.Whitespace - XPathNodeType.Text);
1700private bool IsValidChildType(XPathNodeType type) {
1702case XPathNodeType.Root:
1704case XPathNodeType.Element:
1705case XPathNodeType.SignificantWhitespace:
1706case XPathNodeType.Whitespace:
1707case XPathNodeType.ProcessingInstruction:
1708case XPathNodeType.Comment:
1712case XPathNodeType.Element:
1714case XPathNodeType.Element:
1715case XPathNodeType.Text:
1716case XPathNodeType.SignificantWhitespace:
1717case XPathNodeType.Whitespace:
1718case XPathNodeType.ProcessingInstruction:
1719case XPathNodeType.Comment:
1728private bool IsValidSiblingType(XPathNodeType type) {
1730case XPathNodeType.Element:
1731case XPathNodeType.Text:
1732case XPathNodeType.SignificantWhitespace:
1733case XPathNodeType.Whitespace:
1734case XPathNodeType.ProcessingInstruction:
1735case XPathNodeType.Comment:
1737case XPathNodeType.Element:
1738case XPathNodeType.Text:
1739case XPathNodeType.SignificantWhitespace:
1740case XPathNodeType.Whitespace:
1741case XPathNodeType.ProcessingInstruction:
1742case XPathNodeType.Comment:
1891case XPathNodeType.Element :
1894case XPathNodeType.Attribute:
1895case XPathNodeType.Namespace :
1896case XPathNodeType.ProcessingInstruction:
1900case XPathNodeType.Text :
1901case XPathNodeType.Whitespace :
1902case XPathNodeType.SignificantWhitespace:
1903case XPathNodeType.Comment :