[oXygen-user] [oXygen XML Editor Blog] - Adding CALS-table related functionality to your custom Oxygen framework

oXygen XML Editor Blog
Fri Oct 30 23:33:15 CDT 2015


oXygen XML Editor Blog

///////////////////////////////////////////
Adding CALS-table related functionality to your custom Oxygen framework

Posted: 30 Oct 2015 07:32 AM PDT
http://feedproxy.google.com/~r/AboutOxygenXmlEditor/~3/dZaVU4PwlCc/adding-cals-table-related-functionality.html?utm_source=feedburner&utm_medium=email

                     Oxygen comes with full support for CALS tables in DITA  
and                     Docbook documents, meaning that you can easily make  
selections, resize                 columns, and invoke special actions like  
insert or delete rows and columns, join, or                 split cells.  
You can also easily customize tables properties such as  
alignments,                 separators, and table borders. But what if you  
are editing documents from other                 vocabularies, containing  
tables with CALS structure? What you can do to                 obtain the  
same table editing features?             Let's suppose that you already  
created an Oxygen framework for your documents                 vocabulary  
(if you need further information about frameworks, see  
http://blog.oxygenxml.com/2014/08/the-oxygen-sdk-part-2-frameworks.html).  
What we want to obtain next is to extract all                 the CALS  
tables related support from Docbook framework and add it to  
your                 custom framework. Why Docbook and not DITA as  
reference? Because the                     DITA customization is based on  
the "class" attribute checking while the                     Docbook one is  
more general (element-name oriented).                                   
Table rendering                                                             
copy                                  
[oXygen_install_dir]\frameworks\docbook\css\cals_table.css                             
in your framework css  
directory                                                                  
in                             the                                 Document  
Type edit dialog,                                 Author tab, CSS sub-tab,  
add the                                 ${framework}/css/cals_table.css  
entry to the list                             of the  
CSSs                                                                           
In this way the table will be rendered properly in Author mode and  
the                         following features will be  
available:                                              select cells  
(CTRL+click), rows (click before the row),                              
columns (click on top of the row), tables (click in the left-up  
corner                             of the table)                          
resize table  
column                                                                   
Create table actions                                    Here are the  
table-related actions implemented in Docbook that you  
can                         implement also in you  
framework:                                             Expand  
colspecs                         Insert/Delete Rows                          
Insert/Delete Columns                         Table  
Properties                         Join cells                         Split  
cell                                                                                                   
Copy                                 
[oXygen_installation_dir]\frameworks\docbook\docbook.jar  
in                             your framework directory (this jar contains  
all the table operations                             classes needed to  
create table actions). In Document                                 type  
edit dialog go to Classpath tab and                             add the  
docbook.jar from your framework directory to the list of  
paths.                             In this way you have access to all table  
operations from your                              
framework.                                                                  
For every table action you have to define a corresponding action in  
the                                 Document type configuration dialog.  
Here are the                             details:  
https://www.oxygenxml.com/doc/versions/17.1/ug-editor/#topics/the-action-dialog.html.  
You can look at the corresponding                             Docbook  
action to see the properties (id, name, icons, the  
conditions                             that enables it, the specific  
operation for CALS tables).                        Once you created these  
actions you can add them to the  
UI.                                                                                            
Add table actions to menu, toolbar and contextual  
menu                                                            To add an  
action to the menu go to Document Type                             
configuration dialog, Author tab, Menu                            sub-tab,  
select the action from Available actions                            section  
and add it to the Current action  
section.                                                                 To  
add an action to the contextual menu go to  
Document                                 Type configuration dialog, Author  
tab,                                 Contextual menu sub-tab, select the  
action from                                 Available actions section and  
add it to the                                 Current action  
section.                                                                 To  
add an action to the toolbar go to Document Type                             
configuration dialog, Author tab,                                 Toolbar  
sub-tab, select the action from                                 Available  
actions section and add it to the                                 Current  
action section.                                                            
If all goes well, your custom framework which uses the             standard  
CALS table naming mechanism will properly handle tables, both for display  
and             for table-related operations.

--
You are subscribed to email updates from "oXygen XML Editor Blog."
To stop receiving these emails, you may unsubscribe now:  
https://feedburner.google.com/fb/a/mailunsubscribe?k=y_tRXtumvTurKTedh51JnlYsGXw

Email delivery powered by Google.
Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, United  
States

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20151031/4c483fed/attachment.html>


More information about the oXygen-user mailing list