Beispiel #1
0
        private void ProcessUnknownStructuralAttributes(ICollection <string> knownItems, XmlElement element, MessageVisitor visitor
                                                        )
        {
            XmlAttributeCollection attrs = element.Attributes;

            if (attrs != null)
            {
                foreach (XmlNode node in new XmlNamedNodeMapIterable(attrs))
                {
                    XmlAttribute item = (XmlAttribute)node;
                    if (IsIgnorable(item))
                    {
                    }
                    else
                    {
                        // skip it
                        if (!NamespaceUtil.IsHl7Node(item))
                        {
                        }
                        else
                        {
                            // skip it
                            if (!knownItems.Contains(item.Name))
                            {
                                knownItems.Add(item.Name);
                                // this call will intentionally fail fast with an error (since relationship is null)
                                visitor.VisitStructuralAttribute(element, item, null);
                            }
                        }
                    }
                }
            }
        }
Beispiel #2
0
 private void ProcessRelationship(Interaction interaction, MessagePart messagePart, RelationshipBridge relationship, MessageVisitor
                                  visitor)
 {
     if (relationship.IsStructuralAttribute())
     {
         XmlAttribute attr = relationship.GetAttribute();
         visitor.VisitStructuralAttribute(relationship.GetBase(), attr, relationship.GetRelationship());
     }
     else
     {
         if (relationship.IsAssociation())
         {
             visitor.VisitAssociation(relationship.GetBase(), relationship.GetXmlName(), relationship.GetElements(), relationship.GetRelationship
                                          ());
             ProcessEachRelationshipValue(interaction, relationship, visitor);
         }
         else
         {
             visitor.VisitNonStructuralAttribute(relationship.GetBase(), relationship.GetElements(), relationship.GetRelationship());
         }
     }
 }