internal XsltElement GetOutputElement(IFieldData fieldData) { switch (fieldData?.ContentType) { case ContentType.Variable: return(xslt.Variable(fieldData.Name)); case ContentType.Attribute: return(xslt.Attribute(fieldData.Name)); case ContentType.Element: return(xslt.Element(fieldData.Name)); case ContentType.Text: return(xslt.Text()); case ContentType.Number: return(xslt.Number()); case ContentType.Calculation: case ContentType.Aggregation: return(xslt.ValueOf(fieldData.Name)); default: return(null); } }
public void Number_None_CreatesElement() { var xslt = new XsltFactory(); var text = xslt.Number(); Assert.Equal("number", text.Name.LocalName); Assert.False(text.Attributes().Any()); }