public override INodePointer CreateChild(SifXPathContext context, string name, int i) { SifVersion version = Version; IElementDef subEleDef = GetChildDef(name); SifFormatter formatter = Adk.Dtd.GetFormatter(version); SifElement sifElement = (SifElement)fElement; // Check to see if this child has a render surrogate defined IRenderSurrogate rs = subEleDef.GetVersionInfo(version).GetSurrogate(); if (rs != null) { return(rs.CreateChild(this, formatter, version, context)); } if (subEleDef.Field) { SifSimpleType ssf = subEleDef.TypeConverter.GetSifSimpleType(null); SimpleField sf = formatter.SetField(sifElement, subEleDef, ssf, version); return(SimpleFieldPointer.Create(this, sf)); } else { SifElement newEle = SifElement.Create(sifElement, subEleDef); formatter.AddChild(sifElement, newEle, version); return(new SifElementPointer(this, newEle, version)); } }