wv, special characters and stylesheet.

Caolan McNamara (Caolan.McNamara@ul.ie)
Tue, 05 Oct 1999 14:21:11 +0100 (IST)


Special Chars
============
Currently in the wv lib you register to be told of
such events as para begin, para end, character run begin and end, and
receive character.

There are special chars such as 0x05 and 0x08 i.e. insert comment and
graphic respecively, what is the preferred input route for these ?

a) just the current receive char, and the abi char scanner on receipt of a
special char requests from the wv lib for all the relevent information about
this special char iself ?
b) wv has seperate events for these, and you register a comment and
graphic handler which get called when wv notices them for you

There isnt all that much difference really I suppose, but im dithering
between them, which makes more sense ?

a) might be messy for the abi side.
b) might cause a profilation of all sorts of event handlers ? as there
are maybe 6 or 7 other "special char" cases.

Stylesheet
==========
Also for the html output im implementing a style per style override
ability where word styles can be mapped into html stylesheet styles
if the user so desires, so I might muck out some sort of api for this
that might be benefecial for mapping word styles to abi ones.

Though to be honest most of the code is already ther. If abi parses the
STSH member of the wvParseStruct they can get the name and attributes
of each style, and the pap->istd (index into this STSH) maps what base
style each para was based upon. Though without examining the style closely
you cannot tell if the para has modified its parent style. How about I add
a little flag to the elehandler routine that is just marked clean or dirty,
if its clean then the para is exactly the same as its base style, and if
its dirty then it is modified ? And you have to check element by element
to see what the change was in the dirty case ?. The only other way to do this
is to open up the whole paragraph property creation code, which is not
something that anyone should ever have to parse, even if it would (possibly)
be more efficient in finding out how the para differs from the base style, as
word encodes the differeces into small (but often complex to understand) sprms.

C.

Real Life: Caolan McNamara * Doing: MSc in HCI
Work: Caolan.McNamara@ul.ie * Phone: +353-86-8790257
URL: http://www.csn.ul.ie/~caolan * Sig: an oblique strategy
Honor thy error as a hidden intention



This archive was generated by hypermail 1.03b2.