Page 1 of 1

Plugin Development

Posted: Wed Feb 13, 2008 9:31 am
by Uli
Hello,

i want to develop a plugin which automatically fills
out all empty ID attributes in my xml file.
I started to make document plugin but how can
i access my elements and their attributes?

Another question:
Is it possible to develop a event plugin.
For example i want to fill some attributes each
time a element with a certain name is inserted.

Thanks, Uli

Re: Plugin Development

Posted: Thu Feb 14, 2008 1:10 pm
by sorin_ristache
Hello,

The API available for plugins does not give access to the elements and attributes of the XML elements. In a document plugin you have access to the contents of the document and you have to locate the elements that you want by analyzing the text of the XML document in the code of your plugin. We will consider giving access to the elements of the XML document in the API for plugins in a future version of oXygen.

If you want to fill automatically the value of an attribute when the element with that attribute is inserted in the XML document you should use fixed attribute values or default attribute values in the schema associated with your XML document, for example XML Schema.


Regards,
Sorin