public static XElement SpanDates(SNode item, SNode excepted) { string df = item.DateFirst(); string dl = item.DateLast(); XElement xdates = (!String.IsNullOrEmpty(df) || !String.IsNullOrEmpty(dl)) ? new XElement("span", //new XAttribute("class", "date"), // "[" + SSNodeExt.DatePrinted(df) + (dl != null ? "-" + SSNodeExt.DatePrinted(dl) : "") //+ "]" ) : null; IEnumerable <XObject> xPlaces = from inDoc in item.InverseProperties("in-doc") let ground = inDoc.AllElseProps <SDataLink>().FirstOrDefault(g => g.Definition.Id == "ground") where ground != null && ground.InnerText == "place" let reflectedPlace = inDoc.AllElseProps <SObjectLink>().FirstOrDefault(refl => refl.Definition.Id == "reflected") where reflectedPlace != null && reflectedPlace.Target != null && reflectedPlace.Target != excepted && reflectedPlace.Target.Name() != String.Empty select new XElement("span", reflectedPlace.Target.Name()); //,new XAttribute("href", "?id="+reflectedPlace.TargetId)); return(new XElement("span", new XAttribute("style", "text-align:center;"), xdates, xdates != null && xPlaces.Any() ? ", " : null, EnumExtensions.InsertSplitter(xPlaces, new XText(", ")))); }