private void ReadQualifiedName(PrefixHandle prefix, StringHandle localName) { int offset; int offsetMax; byte[] buffer = BufferReader.GetBuffer(out offset, out offsetMax); int ch = 0; int anyChar = 0; int prefixChar = 0; int prefixOffset = offset; if (offset < offsetMax) { ch = buffer[offset]; prefixChar = ch; if ((s_charType[ch] & CharType.FirstName) == 0) anyChar |= 0x80; anyChar |= ch; offset++; while (offset < offsetMax) { ch = buffer[offset]; if ((s_charType[ch] & CharType.Name) == 0) break; anyChar |= ch; offset++; } } else { anyChar |= 0x80; ch = 0; } if (ch == ':') { int prefixLength = offset - prefixOffset; if (prefixLength == 1 && prefixChar >= 'a' && prefixChar <= 'z') prefix.SetValue(PrefixHandle.GetAlphaPrefix(prefixChar - 'a')); else prefix.SetValue(prefixOffset, prefixLength); offset++; int localNameOffset = offset; if (offset < offsetMax) { ch = buffer[offset]; if ((s_charType[ch] & CharType.FirstName) == 0) anyChar |= 0x80; anyChar |= ch; offset++; while (offset < offsetMax) { ch = buffer[offset]; if ((s_charType[ch] & CharType.Name) == 0) break; anyChar |= ch; offset++; } } else { anyChar |= 0x80; ch = 0; } localName.SetValue(localNameOffset, offset - localNameOffset); if (anyChar >= 0x80) { VerifyNCName(prefix.GetString()); VerifyNCName(localName.GetString()); } } else { prefix.SetValue(PrefixHandleType.Empty); localName.SetValue(prefixOffset, offset - prefixOffset); if (anyChar >= 0x80) { VerifyNCName(localName.GetString()); } } BufferReader.Advance(offset - prefixOffset); }
protected Namespace LookupNamespace(PrefixHandle prefix) { Namespace ns = _nsMgr.LookupNamespace(prefix); if (ns == null) XmlExceptionHelper.ThrowUndefinedPrefix(this, prefix.GetString()); return ns; }
private void ReadQualifiedName(PrefixHandle prefix, StringHandle localName) { int num; int num2; byte[] buffer = base.BufferReader.GetBuffer(out num, out num2); int index = 0; int num4 = 0; int num5 = 0; int offset = num; if (num < num2) { index = buffer[num]; num5 = index; if ((charType[index] & 1) == 0) { num4 |= 0x80; } num4 |= index; num++; while (num < num2) { index = buffer[num]; if ((charType[index] & 2) == 0) { break; } num4 |= index; num++; } } else { num4 |= 0x80; index = 0; } if (index != 0x3a) { prefix.SetValue(PrefixHandleType.Empty); localName.SetValue(offset, num - offset); if (num4 >= 0x80) { this.VerifyNCName(localName.GetString()); } } else { int length = num - offset; if (((length == 1) && (num5 >= 0x61)) && (num5 <= 0x7a)) { prefix.SetValue(PrefixHandle.GetAlphaPrefix(num5 - 0x61)); } else { prefix.SetValue(offset, length); } num++; int num8 = num; if (num < num2) { index = buffer[num]; if ((charType[index] & 1) == 0) { num4 |= 0x80; } num4 |= index; num++; while (num < num2) { index = buffer[num]; if ((charType[index] & 2) == 0) { break; } num4 |= index; num++; } } else { num4 |= 0x80; index = 0; } localName.SetValue(num8, num - num8); if (num4 >= 0x80) { this.VerifyNCName(prefix.GetString()); this.VerifyNCName(localName.GetString()); } } base.BufferReader.Advance(num - offset); }
private string GetQNameDictionaryText() { DiagnosticUtility.DebugAssert(_type == ValueHandleType.QName, ""); return(string.Concat(PrefixHandle.GetString(PrefixHandle.GetAlphaPrefix(_length)), ":", _bufferReader.GetDictionaryString(_offset))); }
string GetQNameDictionaryText() { Fx.Assert(type == ValueHandleType.QName, ""); return(string.Concat(PrefixHandle.GetString(PrefixHandle.GetAlphaPrefix(length)), ":", bufferReader.GetDictionaryString(offset))); }
public int CompareTo(PrefixHandle that) { return GetString().CompareTo(that.GetString()); }
public int CompareTo(PrefixHandle that) { return(GetString().CompareTo(that.GetString())); }
private void ReadQualifiedName(PrefixHandle prefix, StringHandle localName) { int num; int num2; byte[] buffer = base.BufferReader.GetBuffer(out num, out num2); int index = 0; int num4 = 0; int num5 = 0; int offset = num; if (num < num2) { index = buffer[num]; num5 = index; if ((charType[index] & 1) == 0) { num4 |= 0x80; } num4 |= index; num++; while (num < num2) { index = buffer[num]; if ((charType[index] & 2) == 0) { break; } num4 |= index; num++; } } else { num4 |= 0x80; index = 0; } if (index != 0x3a) { prefix.SetValue(PrefixHandleType.Empty); localName.SetValue(offset, num - offset); if (num4 >= 0x80) { this.VerifyNCName(localName.GetString()); } } else { int length = num - offset; if (((length == 1) && (num5 >= 0x61)) && (num5 <= 0x7a)) { prefix.SetValue(PrefixHandle.GetAlphaPrefix(num5 - 0x61)); } else { prefix.SetValue(offset, length); } num++; int num8 = num; if (num < num2) { index = buffer[num]; if ((charType[index] & 1) == 0) { num4 |= 0x80; } num4 |= index; num++; while (num < num2) { index = buffer[num]; if ((charType[index] & 2) == 0) { break; } num4 |= index; num++; } } else { num4 |= 0x80; index = 0; } localName.SetValue(num8, num - num8); if (num4 >= 0x80) { this.VerifyNCName(prefix.GetString()); this.VerifyNCName(localName.GetString()); } } base.BufferReader.Advance(num - offset); }
private string GetQNameDictionaryText() { return(PrefixHandle.GetString(PrefixHandle.GetAlphaPrefix(this.length)) + ":" + this.bufferReader.GetDictionaryString(this.offset)); }