Dear Mr Shafie, I have a question concerning Table-Editing. I manage to edit CALS-Tables with the Table-Editor. But I would like that XMLMind automatically inserts/deletes a an element "colspec" if an column is inserted/deleted.
I found something on the web (http://tech.groups.yahoo.com/group/dita-users/message/8905), but it does not work. I know that you are not responsible for other peoples code, but maybe you see why the code does not work. Any help would be great, as this is beyond my Xpath, etc abilities. As I said: The CALS-Table-Editor (insering/deleting, etc) works fine. But custom.checkColspecs does not seem to cause any action. By the way: Are there any feature anhancements in the "com.xmlmind.xmleditapp.tableedit.GenericTableEdit" in XMLMind Version 4? Kindest regards from Z?rich where I keep my fingers crossed for the French who play tomorrow in Z?rich against Italy :-) Thomas <command name="gre.GenericTableEdit"> <class>com.xmlmind.xmleditapp.tableedit.GenericTableEdit</class> </command> <property name="gre.GenericTableEdit.tableSpecification"> table=Table tgroup rowGroup=tbody thead tfoot row=row cell=entry rowSpan=morerows+1 </property> <command name="gre.tableEdit"> <macro> <sequence> <command name="gre.GenericTableEdit" parameter="%*"/> <command name="custom.checkColspecs" /> </sequence> </macro> </command> <command name="custom.checkColspecs"> <macro> <sequence> <set variable="cscount" expression="count(ancestor-or-self::Table/tgroup/colspec)" context="$implicitElement"/> <set variable="cols" expression="ancestor-or-self::Table/tgroup/@cols" context="$implicitElement"/> <choice> <sequence> <test expression="$cscount != $cols"/> <command name="selectNode" parameter="ancestorOrSelf[implicitElement] Table"/> <command name="selectNode" parameter="child tgroup"/> <get expression="concat($cscount,' ',$cols)"/> <command name="custom.adjustColspecs" parameter="%_"/> <command name="cancelSelection"/> </sequence> <command name="cancelSelection"/> </choice> </sequence> </macro> </command> <command name="custom.adjustColspecs"> <macro> <sequence> <set variable="cscount" expression="%0" plainString="true"/> <set variable="cols" expression="%1" plainString="true"/> <command name="selectNode" parameter="ancestorOrSelf[implicitElement] tgroup"/> <command name="selectNode" parameter="firstChild[implicitElement]"/> <choice> <sequence> <test expression="$cols > $cscount"/> <command name="insert" parameter="before[implicitElement] colspec"/> <get expression="concat(($cscount+1),' ',$cols)"/> <command name="custom.adjustColspecs" parameter="%_"/> </sequence> <sequence> <test expression="$cscount > $cols"/> <command name="delete" parameter="[implicitElement]"/> <get expression="concat(($cscount-1),' ',$cols)"/> <command name="custom.adjustColspecs" parameter="%_"/> </sequence> </choice> </sequence> </macro> </command> -- Thomas Dumm Redaktor f?r Mathematik und Physik, Leiter eMedien Compendio Bildungsmedien Hotzestrasse 33 Postfach 8042 Z?rich Tel. 044 368 21 45 Fax 044 368 21 70 www.compendio.ch www.bildungsmedien-nach-mass.ch www.eduscout.ch

