'Requires:
field_name -- the first word in the string
name -- the changed name according to the dictionary
line -- the string to be parsed
Returns:
The name of the field.
Logic:
A page reference field looks like this:
PAGEREF _Toc440880424 \h
I want to extract the second line of info, which is used as an
achor in the resulting XML file.'

def __ref_func(self, field_name, name, line):

    the_string = name
    match_group = re.search(self.__format_text_exp, line)
    if match_group:
        name = match_group.group(1)
        changed_name = self.__text_format_dict.get(name)
        if changed_name:
            the_string += ('<format>%s' % changed_name)
        else:
            sys.stderr.write('module    is    fields_string\n')
            sys.stderr.write('method    is    __parse_num_type\n')
            sys.stderr.write(('no    dictionary    entry    for    %s\n' % name))
    line = re.sub(self.__merge_format_exp, '', line)
    words = line.split()
    words = words[1:]
    for word in words:
        if (word[0:1] != '\\'):
            the_string += ('<bookmark>%s' % word)
    index = line.find('\\f')
    if (index > (-1)):
        the_string += '<include-note-number>true'
    index = line.find('\\h')
    if (index > (-1)):
        the_string += '<hyperlink>true'
    index = line.find('\\n')
    if (index > (-1)):
        the_string += '<insert-number>true'
    index = line.find('\\r')
    if (index > (-1)):
        the_string += '<insert-number-relative>true'
    index = line.find('\\p')
    if (index > (-1)):
        the_string += '<paragraph-relative-position>true'
    index = line.find('\\t')
    if (index > (-1)):
        the_string += '<suppress-non-delimeter>true'
    index = line.find('\\w')
    if (index > (-1)):
        the_string += '<insert-number-full>true'
    return [None, None, the_string]
