65
67
_class_xpath = etree.XPath("descendant-or-self::*[@class and contains(concat(' ', normalize-space(@class), ' '), concat(' ', $class_name, ' '))]")
66
68
_id_xpath = etree.XPath("descendant-or-self::*[@id=$id]")
67
69
_collect_string_content = etree.XPath("string()")
69
71
_css_import_re = re.compile(r'@import "(.*?)"')
70
72
_label_xpath = etree.XPath("//label[@for=$id]|//x:label[@for=$id]",
71
73
namespaces={'x':XHTML_NAMESPACE})
72
74
_archive_re = re.compile(r'[^ ]+')
74
82
def _transform_result(typ, result):
75
83
"""Convert the result back into the input type.