Return list of <param>s corresponding to range `ran`.

        `kw` is the statement keyword determining the type of the
        range, i.e. 'range' or 'length'. `ran` is the internal
        representation of a range as constructed by the `get_ranges`
        method.

def range_params(self, ran, kw):
        """Return list of <param>s corresponding to range `ran`.

        `kw` is the statement keyword determining the type of the
        range, i.e. 'range' or 'length'. `ran` is the internal
        representation of a range as constructed by the `get_ranges`
        method.
        """
        if kw == "length":
            if ran[0][0] != "m" and (len(ran) == 1 or ran[0] == ran[1]):
                elem = SchemaNode("param").set_attr("name","length")
                elem.text = ran[0]
                return [elem]
            min_ = SchemaNode("param").set_attr("name","minLength")
            max_ = SchemaNode("param").set_attr("name","maxLength")
        else:
            if len(ran) == 1: ran *= 2 # duplicating the value
            min_ = SchemaNode("param").set_attr("name","minInclusive")
            max_ = SchemaNode("param").set_attr("name","maxInclusive")
        res = []
        if ran[0][0] != "m":
            elem = min_
            elem.text = ran[0]
            res.append(elem)
        if ran[1][0] != "m":
            elem = max_
            elem.text = ran[1]
            res.append(elem)
        return res