"""body.py: Objects to represent input files for PyStyler $Revision: 1.29 $ $Date: 2001/01/17 00:27:57 $ Exports: class Body: Represents one page input (body) file class LinkVar: Represents one variation of link text used in an ... construct class Target: Represents someplace a link can point """ import sys import string # Standard string functions import re # Standard regular expression package from sgmltag import * # My SGML parsing stuff from log import * # Error logging routine from library from scan import * # File scanning routines from library #================================================================ # Verification functions #---------------------------------------------------------------- # effective-next(body, plan) == # if body contains a tag -> None # else if body contains a tag -> # a target representing shortname foo # else if the body's topic has a right-hand sibling in plan -> # a target representing that sibling # else -> None #-- # NB: If there are multiple tags, the last one wins. #---------------------------------------------------------------- # effective-prev(body, plan) == # if body contains a tag -> None # else if body contains a tag -> # a target representing shortname foo # else if the body's topic has a left-hand sibling in the plan -> # a target representing that sibling # else -> None #-- # NB: If there are multiple tags, the last one wins. #---------------------------------------------------------------- # effective-see-list(body, plan) == # a list consisting of: # (1) a target representing the parent topic of this body's # topic, unless a occurs in the body file; plus # (2) any targets mentioned in tags (after the # last if any) #---------------------------------------------------------------- # effective-template(body, plan) == # if the body file contains a tag and # that fileName names a valid template file -> # a Template object representing fileName # else -> # the default template from body's topic #---------------------------------------------------------------- # our-tag-list == # { , , , , , , , , #