Enrique wrote:

> Is it possible to define a common API to manage OpenDocument 
> programmatically?(not including GUI aspects), yes, of course. And with 
> some more rounds of standarization and agreement between software makers 
> it will be a reality. Not in the short term, but an idea that deserves 
> consideration and long-term determination to make it happen.

This API already exists, it's DOM, but in OOo at least now (for
technical reasons) it is not applicable in "live" mode. That means, you
can apply changes through DOM while you load the document without any
problems, but if you do it after loading you need to re-import the
document (or at least parts of it) from its XML representation or keep
the whole DOM in memory all the time and update your document core
automatically. Both is currently not implemented in OOo, but IMHO it is
basically possible to implement it.

The DOM API itself is standardized, but this alone is not enough to get
portable macros, you also need a common XML format - but that's given in
our case - thanks to OpenDocument.

Admittedly DOM is way too complicated for the average user (not for a
large number of HTML hackers of course), but this can be overcome by
standardizing on "high level" macro functions that can be implemented
with DOM. The nice thing is that this implementation has to be carried
out only once in each scripting language and each application that
implements DOM can use it (provided that it has a suitable component
technology and language binding for the scripting language and the
component technology).

This way we decouple the different efforts:

A group of people can think about a standardized, more procedural or
"conventional object" oriented approach for macros and provide
implementations for it based on DOM calls for different scripting
languages. If all applications used the same component technology we
would need only one implementation of this API that can be used in all
scripting languages, but that is very unlikely to happen.

Each application that wants to support the standardized macros must
provide a suitable component technology (like UNO) and a DOM API
implementation based on it that can be called from any scripting
language that is able to utilize this component technology through a
language binding. This is already possible with OOo.

Additionally to support "live editing" of documents a DOM update
mechanism must be implemented for the application and OOo currently
doesn't have this. It's a huge undertaking, but IMHO it has a higher
probability to get implemented than anything else I can think of with
the goal of macro standardization. And it has the additional benefit
that it automatically falls back to OpenDocument!

Please get me right: I don't ask for doing this now or in the near
future, but *if* macro standardization ever became a high priority
that's the way I would like to do it.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to