Greetings all,

I've found the problem:  In  setVariables(),  the command 
vars.Add("PAGEHEADER", new String(config->Find("page_list_header")));
is executed before the command
vars.Add("PAGELIST", str);
That means that ${PAGELIST} is expanded as empty when the string is 
created.

Swapping the order of these solves the particular problem, but the 
more fundamental problem is that any variable can (or should be able 
to be) defined in terms of any other, and there is no ordering which 
can allow that.  One possibility would be to go through and set each 
variable *twice*, so that second time around, most variables should 
have their right values.  Of course, chains of variables defined in 
terms of each other would need more than two iterations...

Another option would be to merge  vars  with  config  so that the 
literal string  ${PAGELIST}  would be added, and only evaluated when 
the variable is finally expanded during output.

Cheers,
Lachlan


On Fri, 24 Oct 2003 22:49, Lachlan Andrew wrote:
> Are variables in (no_)page_list_header supposed to be expanded?
>
> If  page_list_header = ${PAGELIST} then PAGEHEADER is empty when
> there is more than one page, even though  PAGELIST  isn't.
-- 
[EMAIL PROTECTED]
ht://Dig developer DownUnder  (http://www.htdig.org)


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
ht://Dig Developer mailing list:
[EMAIL PROTECTED]
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-dev

Reply via email to