public Metadata Export(Presentation destPres)
        {
            Metadata md = destPres.MetadataFactory.Create(GetType());

            md.NameContentAttribute = NameContentAttribute.Copy();
            foreach (MetadataAttribute a in OtherAttributes.ContentsAs_Enumerable)
            {
                md.OtherAttributes.Insert(md.OtherAttributes.Count, a.Copy());
            }
            return(md);
        }
        public override bool ValueEquals(WithPresentation other)
        {
            if (!base.ValueEquals(other))
            {
                return(false);
            }

            Metadata otherz = other as Metadata;

            if (otherz == null)
            {
                return(false);
            }

            if (!NameContentAttribute.ValueEquals(otherz.NameContentAttribute))
            {
                return(false);
            }

            if (OtherAttributes.Count != otherz.OtherAttributes.Count)
            {
                return(false);
            }

            foreach (MetadataAttribute attr in OtherAttributes.ContentsAs_Enumerable)
            {
                bool oneIsEqual = false;
                foreach (MetadataAttribute attrOther in otherz.OtherAttributes.ContentsAs_Enumerable)
                {
                    if (attrOther.ValueEquals(attr))
                    {
                        oneIsEqual = true;
                        break;
                    }
                }
                if (!oneIsEqual)
                {
                    return(false);
                }
            }

            return(true);
        }
        protected override void XukOutChildren(XmlWriter destination, Uri baseUri, IProgressHandler handler)
        {
            base.XukOutChildren(destination, baseUri, handler);

            NameContentAttribute.XukOut(destination, baseUri, handler);

            if (OtherAttributes.Count > 0)
            {
                if (PrettyFormat)
                {
                    destination.WriteStartElement(XukStrings.MetadataOtherAttributes, XukAble.XUK_NS);
                }
                foreach (MetadataAttribute a in OtherAttributes.ContentsAs_Enumerable)
                {
                    a.XukOut(destination, baseUri, handler);
                }
                if (PrettyFormat)
                {
                    destination.WriteEndElement();
                }
            }
        }