/// <summary> /// Gets the citation collection. /// </summary> /// <remarks> /// Can not sort as we go as we then lose the ability to choose the first image link for /// references. This can only be done when everything is fully loaded. /// </remarks> /// <param name="xmlData"> /// The XML data. /// </param> /// <returns> /// </returns> private HLinkCitationModelCollection GetCitationCollection(XElement xmlData) { HLinkCitationModelCollection t = new HLinkCitationModelCollection(); IEnumerable <XElement> theERElement = from ORElementEl in xmlData.Elements(ns + "citationref") select ORElementEl; if (theERElement.Any()) { // load citation object references foreach (XElement theLoadORElement in theERElement) { HLinkCitationModel t2 = new HLinkCitationModel { HLinkKey = GetAttribute(theLoadORElement.Attribute("hlink")), }; t.Add(t2); if (t2.DeRef.Id == "C0525") { } } } // Return sorted by the default text t.SortAndSetFirst(); return(t); }
/// <summary> /// Gets the citation collection. /// </summary> /// <remarks> /// Can not sort as we go as we then lose the ability to choose the first image link for /// references. This can only be done when everything is fully loaded. /// </remarks> /// <param name="xmlData"> /// The XML data. /// </param> /// <returns> /// </returns> private HLinkCitationModelCollection GetCitationCollection(XElement xmlData) { HLinkCitationModelCollection t = new HLinkCitationModelCollection { Title = "Citation Collection" }; IEnumerable <XElement> theERElement = from ORElementEl in xmlData.Elements(ns + "citationref") select ORElementEl; if (theERElement.Any()) { // load citation object references foreach (XElement theLoadORElement in theERElement) { HLinkCitationModel t2 = new HLinkCitationModel { HLinkKey = GetHLinkKey(theLoadORElement), }; t.Add(t2); if (t2.DeRef.Id == "C0525") { } } } // Do not sort but accept input Citation order return(t); }