internal static ProjectionInfo BuildProjections(MemberMappingDescriptor desc, XmlNodeList projections)
        {
            if (projections.Count < 1)
            {
                return(new ProjectionInfo());
            }

            List <ProjectionItem> projectionItems = new List <ProjectionItem>(3);

            foreach (XmlNode node in projections)
            {
                // no check for existance, that is done with schema
                string to = GetAttributeValue(node.Attributes["to"]);
                if (to == string.Empty)
                {
                    string message = ErrorBuilder.EmptyToAttributeInXmlError(desc, node.InnerXml);
                    throw new OtisException(message);
                }

                // if 'from' is missing, it is assumed to be same as 'to'
                string from = GetAttributeValue(node.Attributes["from"], to);

                projectionItems.Add(
                    new ProjectionItem(
                        ExpressionParser.NormalizeExpression(from),
                        ExpressionParser.NormalizeExpression(to)));
            }

            return(ProjectionBuilder.Build(desc, projectionItems));
        }