Re: Testing on attribute values in nested lists

Subject: Re: Testing on attribute values in nested lists
From: Tomas Eriksson <ter@xxxxxxxxx>
Date: Fri, 23 Jan 1998 14:25:07 +0100
Illegal-object: Syntax error in References: value found on <TomasEriksson's message of"Fri, 23 Jan 1998 11:46:31 +0100"><> ^-illegal end of message identification
Thanks, the testing procedure works fine, but I still have the problem to
collect the list-listitem number (child or element) and place it in front
of the sub.list-listitem number (child or element).

I can not use (child-number (parent (parent (parent (current-node)))))
since the list-listitem is not a parent of sub.list. I have tried to use
preced, but it seems not to work.

What I would like to achive (if it is possible) is the following,

<listitem><text>A. TEXT</text></listitem>
<listitem><text>B. TEXT</text></listitem>
<listitem><text>B.A TEXT</text></listitem>

In the B.A listitem in the sub.list, the B should be collected or
calculated from the second list-listitem and the A is calculated using the
child-number function. The problem is that I have not found any function to
collect the child-number from the list-listitem and generate a

(literal (string-append (format-number (PARNUM_LIST_LISTITEM) "a") ".")
(string-append (format-number (PARNUM_SUB.LIST_LISTITEM) "a") "."))

Has anyone come across a function to solve this procedure I would be much
pleased to hear about it.

Best Regards


>There's a couple of ways to do this, here's one:
>(element LISTITEM
>  (let* ((p-gi (gi (parent (current-node))))
>	 (gp-gi (gi (parent (parent (current-node)))))
>	 (sublist-type (if (equal? p-gi "SUB.LIST")
>	                   (attribute-string "TYPE" (parent (current-node)))
>	                   ""))
>	 (list-type  (if (equal? p-gi "LIST")
>	                 (attribute-string "TYPE" (parent (current-node)))
>                         (if (equal? gp-gi "LIST")
>		             (attribute-string "TYPE" (parent (parent (current-node))))
>	                     ""))))
>  ...
>Now you can test sublist-type and list-type in the body. Note: I haven't
>run this, so check those parens; the proper case of SUB.LIST and LIST and
>depends on your sgml declaration; there's not much error checking here.
>You could also do it by making more specific element rules:
>  ...)
>Does that help?
>> Another question I have is if someone solved the trick  to collect the
>> total number of pages and present the total number on the first page, e.g.
>> Page 1 (23).
>I don't think you can do this with any of the existing Jade backends.
>The coupling between the FOT and the printed page is too loose.
> DSSSList info and archive:

 DSSSList info and archive:

Current Thread
  • Testing on attribute values in nested lists
    • Tomas Eriksson - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id FAA24469Fri, 23 Jan 1998 05:50:44 -0500 (EST)
      • Norman Walsh - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id HAA25518Fri, 23 Jan 1998 07:50:29 -0500 (EST)
        • Tomas Eriksson - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id IAA26199Fri, 23 Jan 1998 08:26:06 -0500 (EST) <=
        • Matthias Clasen - from mail1.ability.netby (8.8.5/8.6.12) with ESMTP id IAA26710Fri, 23 Jan 1998 08:39:35 -0500 (EST)