//// Method adds the currentAttribute to currentElement if both of them exists, //// ie. adds currentAttribute to embeddedElement. private void AddAttributeToCurrentElement() { if (currentAttribute != null) { if ((inLevel == Level.Element) && (currentElement != null)) { currentElement.AddAttribute(currentAttribute); } } }
//// Method adds the currentAttribute to currentElement if both of them exists, //// ie. adds currentAttribute to embeddedElement. private void AddAttributeToCurrentElement() { if (currentAttribute != null) { if ((inLevel == Level.Element) && (currentElement != null)) { //check if it is a duplicate attribute currentElement.AddAttribute(currentAttribute); } } }
//// Method adds the currentAttribute to currentElement if both of them exists, //// ie. adds currentAttribute to embeddedElement. private void AddAttributeToCurrentElement() { if (currentAttribute != null) { if ((inLevel == Level.Element) && (currentElement != null)) { if (!currentElement.AddAttribute(currentAttribute)) { AddValidationMessageAboutDuplicatePropertyForElementCount(); } } else if ((inLevel == Level.EmbeddedElement) && (embeddedElement != null)) { if (!embeddedElement.AddAttribute(currentAttribute)) { AddValidationMessageAboutDuplicatePropertyForElementCount(); } } } }