def METHOD_NAME(prm, is_input):
    """ Encode process description LiteralData (parameter definition) element.
    """
    dtype = prm.dtype
    elem = NIL("LiteralData" if is_input else "LiteralOutput")
    elem.append(OWS("DataType", dtype.name, **{
        ns_ows("reference"): "http://www.w3.org/TR/xmlschema-2/#%s"%dtype.name,
    }))
    if prm.uoms:
        elem.append(NIL("UOMs",
            NIL("Default", OWS("UOM", prm.uoms[0])),
            NIL("Supported", *[OWS("UOM", u) for u in prm.uoms])
        ))
    if is_input:
        elem.append(_encode_allowed_value(prm.allowed_values))
        if prm.default is not None:
            elem.append(NIL("DefaultValue", str(prm.default)))
    return elem