// State stack push & pop private void Push() { this.stateHistory.Push(); this.stateHistory[this.stateHistory.Length - 1] = this.currentEntry; containerStack.Push(GetContainer(this.currentEntry.CurrentState)); this.currentEntry = this.nextEntry; if (this.currentEntry.Name != SchemaNames.Token.XsdAnnotation) { this.hasChild = false; } }
private void Pop() { this.currentEntry = (XsdEntry)this.stateHistory.Pop(); SetContainer(this.currentEntry.CurrentState, containerStack.Pop()); this.hasChild = true; }
private bool GetNextState(XmlQualifiedName qname) { if (this.currentEntry.NextStates != null) { for (int i = 0; i < this.currentEntry.NextStates.Length; ++i) { int state = (int)this.currentEntry.NextStates[i]; if (this.schemaNames.TokenToQName[(int)SchemaEntries[state].Name].Equals(qname)) { this.nextEntry = SchemaEntries[state]; return true; } } } return false; }
internal XsdBuilder( XmlReader reader, XmlNamespaceManager curmgr, XmlSchema schema, XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventhandler ) { this.reader = reader; this.xso = this.schema = schema; this.namespaceManager = new BuilderNamespaceManager(curmgr, reader); this.validationEventHandler = eventhandler; this.nameTable = nameTable; this.schemaNames = schemaNames; this.stateHistory = new HWStack(STACK_INCREMENT); this.currentEntry = SchemaEntries[0]; positionInfo = PositionInfo.GetPositionInfo(reader); }
// State stack push & pop private void Push() { this.stateHistory.Push(); this.stateHistory[this.stateHistory.Length - 1] = this.currentEntry; containerStack.Push(GetContainer(this.currentEntry.CurrentState)); this.currentEntry = this.nextEntry; if (this.currentEntry.Name != SchemaNames.ID.XSD_ANNOTATION) { this.hasChild = false; } }
private bool GetNextState(XmlQualifiedName qname) { if (this.currentEntry.NextStates != null) { foreach(State state in this.currentEntry.NextStates) { if (this.schemaNames.GetName(SchemaEntries[(int)state].Name).Equals(qname)) { this.nextEntry = SchemaEntries[(int)state]; return true; } } } return false; }
private void Pop() { _currentEntry = (XsdEntry)_stateHistory.Pop(); SetContainer(_currentEntry.CurrentState, _containerStack.Pop()); _hasChild = true; }
// State stack push & pop private void Push() { _stateHistory.Push(); _stateHistory[_stateHistory.Length - 1] = _currentEntry; _containerStack.Push(GetContainer(_currentEntry.CurrentState)); _currentEntry = _nextEntry; if (_currentEntry.Name != SchemaNames.Token.XsdAnnotation) { _hasChild = false; } }
internal XsdBuilder( XmlReader reader, XmlNamespaceManager curmgr, XmlSchema schema, XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventhandler ) { _reader = reader; _xso = _schema = schema; _namespaceManager = new BuilderNamespaceManager(curmgr, reader); _validationEventHandler = eventhandler; _nameTable = nameTable; _schemaNames = schemaNames; _stateHistory = new HWStack(STACK_INCREMENT); _currentEntry = s_schemaEntries[0]; _positionInfo = PositionInfo.GetPositionInfo(reader); }