public AttributeParamImpl(IXmlAttribute xmlAttribute,IParameterDescriptorProvider parameterDescriptorProvider) { name = xmlAttribute.AttributeName; nameDocumentRange = xmlAttribute.ToTreeNode().NameNode.GetDocumentRange(); stringValue = xmlAttribute.UnquotedValue; this.parameterDescriptorProvider = parameterDescriptorProvider; }
private void CreateReferenceAttributeValue(IL4NElement element, IXmlAttribute attribute) { if(attribute.Value == null) return; ReferenceParser parser = new ReferenceParser(); IXmlAttributeValue newElement = parser.ParseReferenceName(attribute.Value); IXmlAttributeValueNode childNode = attribute.Value.ToTreeNode(); ITreeNode parent = attribute.ToTreeNode(); ((CompositeElement)parent).AddChildAfter(newElement.ToTreeNode(), childNode); ((CompositeElement)parent).DeleteChildRange(childNode, childNode); }
private void ReplaceAttributeValue(IXmlAttribute attribute, IXmlAttributeValue newElement) { IXmlAttributeValueNode childNode = attribute.Value.ToTreeNode(); ITreeNode parent = attribute.ToTreeNode(); ((CompositeElement)parent).AddChildAfter(newElement.ToTreeNode(), childNode); ((CompositeElement)parent).DeleteChildRange(childNode, childNode); }