Before I set Url = r.Link I want to make sure r.link is not empty string?
Would I be able to do that in this code snippet?
target.RelatedArtifact = template.References.Select(r => new RelatedArtifact()
{
Type = r == template.References.First() ? RelatedArtifact.RelatedArtifactType.DerivedFrom : RelatedArtifact.RelatedArtifactType.Citation,
Display = StripHtml(r.Text).Replace(" .", ".").Replace(" ®", "®") /* Html stripping artifact in <em></em> */,
Url = r.Link
}).ToList();
Output
<relatedArtifact>
<type value="citation" />
<display value="sss, et al. ss. s;2(2):2." />
<url value="" /> shouldn't have this tag?
</relatedArtifact>