let xml_of_category c = let atts = match c.cat_domain with None -> [] | Some d -> ["domain", d] in Element ("category", atts, [PCData c.cat_name])