[oXygen-user] Read from database?
Sorin Ristache
Fri Aug 12 06:40:38 CDT 2011
Hello,
A Selection Plugin should be used for processing the selected text in
the Text editing mode of an editor of type XML (XML files, XSL files,
XSD files, etc). If you want to copy the data from a MySQL table to a
DITA document you can display the table contents in Oxygen by browsing
the database contents in the Data Source Explorer view, right clicking
on the table name and selecting the Edit action from the popup menu.
This action will display the table in a new Oxygen view as in the
following example from the User Manual:
http://www.oxygenxml.com/doc/ug-oxygen/topics/relational-table-explorer.html
Just select and copy the data from the table and paste it in the DITA
document opened in Oxygen.
Is this what you want to do?
If you want in fact to customize Author editing mode for editing DITA
documents in order to display a popup screen for the user with some data
extracted from the MySQL database you should write an Author extension
by using the Author API which is available in the Author SDK. There are
many examples including the Java source code of Author actions in the SDK:
http://www.oxygenxml.com/InstData/Editor/Developer/oxygenAuthorSDK.zip
http://www.oxygenxml.com/developer.html#XML_Editor_Authoring_SDK
If you want to go this route please let us know if you have problems
with the Author API or you get unexplained errors in your Author
extension code.
Best regards,
Sorin
Roderik Dernison wrote:
> Hello,
>
> I use a MySql database. I added the correct driver to the lib directory of Oxygen. I connected it using option 1 you describe.
> I haven't seen any errors anywhere, not in the output.log.
> The plugin I use is a SelectionPlugin. I'll try and see what the CustomProtocolPlugin does.
>
> Kind regards,
>
> Roderik Dernison
> INL
>
> -----Oorspronkelijk bericht-----
> Van: Sorin Ristache [mailto:]
> Verzonden: vrijdag 12 augustus 2011 11:34
> Aan: Roderik Dernison
> CC:
> Onderwerp: Re: [oXygen-user] Read from database?
>
> Hello,
>
> What is the name and version of the database? How did you connect to the database in Oxygen when you could see the data from the database correctly:
>
> 1. through a database connection based on a JDBC database driver and defined in Preferences -> Data Sources,
> (http://www.oxygenxml.com/doc/ug-oxygen/topics/preferences-data-sources.html)
>
> or
>
> 2. using a custom protocol plugin developed in Java as described in the User Manual?
> (http://www.oxygenxml.com/doc/ug-oxygen/tasks/howto-custom-protocol-plugin.html)
>
> If you already have a working connection defined in Preferences a simple way of adding the data to the DITA document is to browse the database contents in the Data Source Explorer view, open the XML file or the SQL table containing the data in Oxygen and copy and paste the data from there to the DITA document.
>
> If you connect to the database with a custom protocol plugin please give us more details about the error that you get in the Java code of your plugin (which acts as a database client) when you try to establish the connection with the database server.
>
>
> Regards,
> Sorin
>
>
> Roderik Dernison wrote:
>
>> Hi,
>>
>> I'm trying to write a plugin to select data from a popup screen. This
>> works - more or less - for static data. But when I try (with Spring
>> and Hibernate) to read from a database the popup screen doesn't show up.
>>
>> The first thing I tried was to make a connection in Oxygen and my data
>> is shown there.
>>
>> How can I insert data from my database into my (Dita) document?
>>
>> Kind regards
>>
>> Roderik Dernison
>>
>> INL
>>
>>
>
> ________________________________
>
> ----------------------------------------------------------
> Aan dit bericht kunnen geen rechten worden ontleend.
> Het bericht is alleen bestemd voor de geadresseerde.
> Indien het bericht niet voor u is bestemd, verzoeken wij
> u dit aan ons te melden en het bericht te verwijderen.
>
> This message shall not constitute any obligations.
> This message is intended solely for the addressee.
> If you have received this message in error, please
> inform us and delete the message.
> ----------------------------------------------------------
>
>
More information about the oXygen-user
mailing list