Re: [greenstone-users] highlighting messes up macros

From jens wille
DateTue, 04 Oct 2005 12:54:41 +0200
Subject Re: [greenstone-users] highlighting messes up macros
In-Reply-To (4341E60F-3000702-cs-waikato-ac-nz)
hi katherine!

on 04.10.2005 04:16, Katherine Don wrote:
> this looks like the highlighting stuff has been applied after all
> the other macro resolution has finished - all the arguments have
> been applied ok, then the span stuff has mucked it up.
that's a more general problem, isnt' it - and i understood the "skip
over rest of html tag" part in highlighttext.cpp to just prevent that.

> This makes sense, cos the c++ code calls get_formatted_string to
> get the document display based on the format statement, then
> calls highlighttext on the whole thing. highlighttext just goes
> through and looks for the query terms in the text, ignoring what
> context they are in.
as far as i can see there are two points where context comes in: the
above mentioned skip-html-tag in highlighttext.cpp and wanttext in
documentaction.cpp - right?

> I am a bit surprised that if you set start and end highlight
> macros to empty it still doesn't work. and your mucked up html is
> different to mine - mine has the macro arguments working
> properly, but yours doesn't.
yeah, that's what bothers me so much. it even affects places where
no highlighted term appears.
i just don't understand it - and was kind of hoping that you guys
had some insight for me ;-)

however, maybe i can play around a bit with the source, see what
happens where... whatever. (this is where an interpreted language
comes in handy - too bad that this now necessitates leaving the
comfortable level of perl scripts and modules, and advance into the
deeper c/c++ code *g*)

> I am not sure what is happening in your case, and I don't know
> what to suggest, except turning off highlighting altogether for
> the collection.
that'd be quite unfortunate... and unsatisfactory, too :-(

> Do you only ever want highlighting in the [Text] part (and not
> metadata or other html from the format statement) - perhaps you
> could modify the C code so that this is what happens.
i considered that, too, but first of all this might not be what we
want, second of all i don't expect it to solve the problem though.

> Sorry I couldn't be more help,
well, thanks anyway - you're always of good help :-)

[actually, that's what i like so much about greenstone (apart from
it being free software): great functionality with still active
development, and kind and helpful developers - big THANKS for that
(though, of course, i know that you (and the software) benefit from
this users-as-"co-developers" kind of thing - this is exactly how
open source works, isn't it ;-). i just hoped i could contribute
more myself, instead of requesting others to solve my problems...)]