214: #line 301 "web_weaver.ipk"
215: def set_original_filename(self, filename):
216: self.original_filename = filename
217:
218: def set_anchor(self, label):
219:
220:
221:
222:
223: href = self.pattern%('%04d'%(self.childcount))+'#'+label
224: self._write('<A NAME="'+label+'"></A>')
225: self.register_anchor(label, href)
226:
227: def register_anchor(self, label, anchor):
228: if not self.persistent_frame.has_key('anchors'):
229: self.persistent_frame['anchors'] = {}
230: self.persistent_frame['anchors'][label]=anchor
231:
232: def get_anchor(self, label):
233: href = None
234: if self.persistent_frame.has_key('anchors'):
235: if self.persistent_frame['anchors'].has_key(label):
236: href =self.persistent_frame['anchors'][label]
237: return href
238:
239: def ref_anchor(self, label):
240: href = self.get_anchor(label)
241: if href:
242: self._write('<A HREF="'+href+'">'+label+'</A>')
243: else:
244: self._write('<EM>Unknown Label:'+label+'</EM>')
245: