Re: Tags in Abiword XML


Subject: Re: Tags in Abiword XML
From: January Weiner 3 (jweiner1@ix.urz.uni-heidelberg.de)
Date: Sat Jan 12 2002 - 11:45:08 CST


Hello again,

> You could use "list-tag" which is totally ignored by the formatter but
> preserved upon import/export.

I got a better idea: hyperlinks. I put something like

<a xlink:href="#bibliography-smith73-nobrackets">Smith and Wesson
(1873)</a>

...and in the bibliography at the end of the document, something like:

<p>
<bookmark type="start" name="bibliography-start">
Bibliography
<bookmark type="end" name="bibliography-start">
</p>
<p>
<bookmark type="start" name="bibliography-smith73-nobrackets">
Smith and Wesson (1873) "Winchester deluxe short rifle". Wild West.
</bookmark type="end" name="bibliography-smith73-nobrackets">
</p>
<p>
<bookmark type="start" name="bibliography-end">
<bookmark type="end" name="bibliography-end">
</p>

This is nice, because it allows you to directly jump from the reference to
the apropriate bibliography entry; however, I don't know how it looks in
print -- having a link in a document (even a link created by Abiword) seems
to crash Abiword whenever I'm trying to print it.

> Alternatively you could invent your own tag just add a line or two to
> make sure it is recognised by the abiword importer.
>
> see src/wp/impexp/ap/ie_imp_AbiWord_1.cpp
>
> Just add you own tag to the list of recognised tags you'll find in the
> file.

OK, I'll try it. Would it be then included in the Abiword source?

> AbiWord will automatically export the tag to it's XML fileformat for you.
>
> >
> > I know, something like that should be coded as a plugin, but I am a
> > full-time scientist and there is a huge time-consumption difference between
> > writing a simple, yet useful perl script (which I did with a couple of
> > hours investement, and the results are already functional) and coding a
> > plugin.
> >
>
> Actually for a plugin you could just subclass ie_imp_AbiWord_1.cpp with
> your own custom importer methods. Most of the rest of the code is boiler
> plate.

I could probably subclass it or whatever you say :-) but my humble
programming experience does not include C++ (only C/gtk and perl). I know
this is not an arcane art, but I've got not much time right now :-(
However, the bibliography perl script will be ready Real Soon Now(TM).

> Look at Dom's Open Office importer plugin for clues.

I will.

Best regards,
j.

----)-\//-///-----------------------------------January-Weiner-3-------
"'Tis true, there's magic in the web of it." -- Shakespeare

-----------------------------------------------
To unsubscribe from this list, send a message to
abiword-user-request@abisource.com with the word
unsubscribe in the message body.



This archive was generated by hypermail 2b25 : Sat Jan 12 2002 - 11:45:16 CST