code: def prevnext(resource):
          
          _prev, _next = False, False
          resource = xmlparser(resource)
          prevnext = resource.xpath("//ti:prevnext", namespaces=XPATH_NAMESPACES)
  
          if len(prevnext) > 0:
              _next, _prev = None, None
              prevnext = prevnext[0]
              _next_xpath = prevnext.xpath("ti:next/ti:urn/text()", namespaces=XPATH_NAMESPACES, smart_strings=False)
              _prev_xpath = prevnext.xpath("ti:prev/ti:urn/text()", namespaces=XPATH_NAMESPACES, smart_strings=False)
  
              if len(_next_xpath):
                  _next = _next_xpath[0].split(":")[-1]
  
              if len(_prev_xpath):
                  _prev = _prev_xpath[0].split(":")[-1]
  
          return _prev, _next
docs: Parse a resource to get the prev and next urn
  
          :param resource: XML Resource
          :type resource: etree._Element
          :return: Tuple representing previous and next urn
          :rtype: (str, str)