internal override XmlSchemaObject Clone() { XmlSchemaSimpleTypeList newList = (XmlSchemaSimpleTypeList)MemberwiseClone(); newList.ItemTypeName = itemTypeName.Clone(); return(newList); }
internal override XmlSchemaObject Clone() { XmlSchemaSimpleTypeRestriction newRestriction = (XmlSchemaSimpleTypeRestriction)MemberwiseClone(); newRestriction.BaseTypeName = baseTypeName.Clone(); return(newRestriction); }
internal override XmlSchemaObject Clone() { XmlSchemaAttribute newAtt = (XmlSchemaAttribute)MemberwiseClone(); //Deep clone the QNames as these will be updated on chameleon includes newAtt._refName = _refName.Clone(); newAtt._typeName = _typeName.Clone(); newAtt._qualifiedName = _qualifiedName.Clone(); return(newAtt); }
internal XmlSchemaObject Clone(XmlSchema?parentSchema) { XmlSchemaElement newElem = (XmlSchemaElement)MemberwiseClone(); //Deep clone the QNames as these will be updated on chameleon includes newElem._refName = _refName.Clone(); newElem._substitutionGroup = _substitutionGroup.Clone(); newElem._typeName = _typeName.Clone(); newElem._qualifiedName = _qualifiedName.Clone(); // If this element has a complex type which is anonymous (declared in place with the element) // it needs to be cloned as well, since it may contain named elements and such. And these names // will need to be cloned since they may change their namespace on chameleon includes XmlSchemaComplexType?complexType = _type as XmlSchemaComplexType; if (complexType != null && complexType.QualifiedName.IsEmpty) { newElem._type = (XmlSchemaType)complexType.Clone(parentSchema); } //Clear compiled tables newElem._constraints = null; return(newElem); }