From: SpLiT
Subject: Interleaf Lisp - Name Head Navigation (1st Post of '98 !)
Date:
Message-ID: <34B4C8C8.681@gecm.com.no.spam>
Hi all and Happy New Year.
I've got a lisp function that counts the number of tables in a
document. The easiest way to do this is to look in the name pool
for doc-table-class and check the table name heads (i.e. unique
tables) and see if each of these has any children, if it does
then count them and produce a total of the number of children in
each of the table name heads to find the total number of tables
in the document. Easy.
When I check the table name pool for a particular document that
contains 4 local tables I find that there is only 1 name head in
the name pool and this does not have a master or any children.
This is becuase the table is exported from a catalog (just the
name head name and id info are stored in the document) but doing
(tell th mid:get-next) should return a local table name head.
Very strange 8-(
I entered the following using Read-Evaluation in the document:
(setq tp (name-find-pool doc-table-class))
Value: #<doc-name-pool 200bc00>
(setq th (tell tp mid:get-child))
Value: #<doc-name-head 200bdb0>
(tell th mid:get-child :along :name)
Value: nil
(tell th mid:get-child :along :structure)
Value: nil
(tell th mid:is-empty)
Value: t
;; ok, this one is a table exported from a catalog
;; with no instance in the document so we carry on
(tell th mid:get-next)
Value: nil
;; this should have returned a local table name head
From this it seems that there are no tables in the document.
Any ideas ?
I'm using Interleaf 6.3.0-003 on Windows NT 4 and obtained the
information on navigating name pools from the Interleaf 5 Lisp
Reference Manuals. I know this is the correct method as I've
used it loads of times before.
Shukas,
SpLiT.
O--------------------------------O----------------------------------O
| Guy Hall (SpLiT) | email: ········@gecm.com.no.spam |
| Mission Avionics Division | phone: (+44) 01634 844400 x5009 |
| GEC-Marconi Avionics Limited | tlink: ······@··@csd06v (GMAv) |
| Remove no.spam to return email | g-net: 791-5009 (GMAv) |
O--------------------------------O----------------------------------O
| Did you know when you're not looking, mushrooms go Ftang, Ftang ? |
O--------------------------------O----------------------------------O