Esempio n. 1
0
def fetch_cfr_parts(notice_xml):
    """ Sometimes we need to read the CFR part numbers from the notice
        XML itself. This would need to happen when we've broken up a
        multiple-effective-date notice that has multiple CFR parts that
        may not be included in each date. """
    cfr_elm = notice_xml.xpath('//CFR')[0]
    results = notice_cfr_p.parseString(cfr_elm.text)
    return list(results)
Esempio n. 2
0
def fetch_cfr_parts(notice_xml):
    """ Sometimes we need to read the CFR part numbers from the notice
        XML itself. This would need to happen when we've broken up a
        multiple-effective-date notice that has multiple CFR parts that
        may not be included in each date. """
    cfr_elm = notice_xml.xpath('//CFR')[0]
    results = notice_cfr_p.parseString(cfr_elm.text)
    return list(results)
Esempio n. 3
0
def fetch_cfr_parts(notice_xml):
    """ Sometimes we need to read the CFR part numbers from the notice
        XML itself. This would need to happen when we've broken up a
        multiple-effective-date notice that has multiple CFR parts that
        may not be included in each date. """
    parts = []
    for cfr_elm in notice_xml.xpath("//CFR"):
        parts.extend(notice_cfr_p.parseString(cfr_elm.text).cfr_parts)
    return list(sorted(set(parts)))
Esempio n. 4
0
def fetch_cfr_parts(notice_xml):
    """ Sometimes we need to read the CFR part numbers from the notice
        XML itself. This would need to happen when we've broken up a
        multiple-effective-date notice that has multiple CFR parts that
        may not be included in each date. """
    parts = []
    for cfr_elm in notice_xml.xpath('//CFR'):
        parts.extend(notice_cfr_p.parseString(cfr_elm.text).cfr_parts)
    return list(sorted(set(parts)))
Esempio n. 5
0
 def cfr_titles(self):
     return list(
         sorted(set(int(notice_cfr_p.parseString(cfr_elm.text).cfr_title) for cfr_elm in self.xpath("//CFR")))
     )
Esempio n. 6
0
 def derive_cfr_refs(self):
     """Pull out CFR information from the CFR tag"""
     for cfr_elm in self.xpath('//CFR'):
         result = notice_cfr_p.parseString(cfr_elm.text)
         yield TitlePartsRef(result.cfr_title, list(result.cfr_parts))
Esempio n. 7
0
 def derive_cfr_refs(self):
     """Pull out CFR information from the CFR tag"""
     for cfr_elm in self.xpath('//CFR'):
         result = notice_cfr_p.parseString(cfr_elm.text)
         yield TitlePartsRef(result.cfr_title, list(result.cfr_parts))
Esempio n. 8
0
 def cfr_titles(self):
     return list(sorted(set(
         int(notice_cfr_p.parseString(cfr_elm.text).cfr_title)
         for cfr_elm in self.xpath('//CFR'))))