public XmlCompletionItemCollection GetAttributeValueCompletion(string text, int offset, XmlSchemaCompletion defaultSchema) { if (XmlParser.IsInsideAttributeValue(text, offset)) { var path = XmlParser.GetActiveElementStartPath(text, offset); var attributeName = XmlParser.GetAttributeNameAtIndex(text, offset); return(GetAttributeValueCompletion(path, attributeName, defaultSchema)); } return(new XmlCompletionItemCollection()); }
public XmlCompletionItemCollection GetNamespaceCompletion(string textUpToCursor) { var attrName = XmlParser.GetAttributeNameAtIndex(textUpToCursor, textUpToCursor.Length); if (attrName == "xmlns" || attrName.StartsWith("xmlns:", StringComparison.Ordinal)) { return(GetNamespaceCompletion()); } return(new XmlCompletionItemCollection()); }