private void ClearCompiledState() { //Re-set post-compiled state for cloned object _attributeUses = null; _localElements = null; _attributeWildcard = null; _contentTypeParticle = XmlSchemaParticle.Empty; _blockResolved = XmlSchemaDerivationMethod.None; }
internal SchemaAttDef?GetAttributeXsd(SchemaElementDecl?ed, XmlQualifiedName qname, XmlSchemaObject?partialValidationType, out AttributeMatchState attributeMatchState) { SchemaAttDef?attdef = null; attributeMatchState = AttributeMatchState.UndeclaredAttribute; if (ed != null) { attdef = ed.GetAttDef(qname); if (attdef != null) { attributeMatchState = AttributeMatchState.AttributeFound; return(attdef); } XmlSchemaAnyAttribute?any = ed.AnyAttribute; if (any != null) { if (!any.NamespaceList !.Allows(qname)) { attributeMatchState = AttributeMatchState.ProhibitedAnyAttribute; } else if (any.ProcessContentsCorrect != XmlSchemaContentProcessing.Skip) { if (_attributeDecls.TryGetValue(qname, out attdef)) { if (attdef.Datatype.TypeCode == XmlTypeCode.Id) { //anyAttribute match whose type is ID attributeMatchState = AttributeMatchState.AnyIdAttributeFound; } else { attributeMatchState = AttributeMatchState.AttributeFound; } } else if (any.ProcessContentsCorrect == XmlSchemaContentProcessing.Lax) { attributeMatchState = AttributeMatchState.AnyAttributeLax; } } else { attributeMatchState = AttributeMatchState.AnyAttributeSkip; } } else if (ed.ProhibitedAttributes.ContainsKey(qname)) { attributeMatchState = AttributeMatchState.ProhibitedAttribute; } }
private void Write33_XmlSchemaAnyAttribute(XmlSchemaAnyAttribute?o) { if ((object?)o == null) { return; } WriteStartElement("anyAttribute"); WriteAttribute(@"id", @"", ((string?)o.@Id)); WriteAttribute("namespace", "", ToString(o.NamespaceList)); XmlSchemaContentProcessing process = o.@ProcessContents == XmlSchemaContentProcessing.@None ? XmlSchemaContentProcessing.Strict : o.@ProcessContents; WriteAttribute(@"processContents", @"", Write34_XmlSchemaContentProcessing(process)); WriteAttributes((XmlAttribute[]?)o.@UnhandledAttributes, o); Write5_XmlSchemaAnnotation((XmlSchemaAnnotation?)o.@Annotation); WriteEndElement(); }
internal void SetAttributeWildcard(XmlSchemaAnyAttribute?value) { _attributeWildcard = value; }