private static void InitAnnotation(XsdBuilder builder, string value)
{
// On most elements annotations are only allowed to be the first child
// (so the element must not have any children by now), and only one annotation is allowed.
// Exceptions are xs:schema and xs:redefine, these can have any number of annotations
// in any place.
if (builder._hasChild &&
builder.ParentElement != SchemaNames.Token.XsdSchema &&
builder.ParentElement != SchemaNames.Token.XsdRedefine)
{
builder.SendValidationEvent(SR.Sch_AnnotationLocation, null);
}
builder._xso = builder._annotation = new XmlSchemaAnnotation();
builder.ParentContainer.AddAnnotation(builder._annotation);
}