public XElement GetSimplifiedSchemaResource() { XElement RVal = new XElement(LWTSD.Namespace + "resource"); RVal.SetAttributeValue("path", Path); RVal.SetAttributeValue("unit", Unit); RVal.SetAttributeValue("description", Description); XElement TypeDesc = new XElement(LWTSD.Namespace + "type"); TypeDesc.SetAttributeValue("base", SimpleType.GetSerializedValue()); if (Restrictions != null) { Restrictions.SerializeToSimpleType(TypeDesc, SimpleType); } RVal.Add(TypeDesc); RVal.Add(GetSupportsElement()); return(RVal); }