Dear Mr. Shafie,

Thank you for your reply! The reason that the element is called "Table" and
not "table" comes from the fact, that we used to have a own table model in
our dtd, which suited us better.
But the own table Model lead to too many problems with xml-editors (by the
way presently we use Arbortext Editor but we want to change this). People
did not change the letter T when changing to CALS, as all our elements have
capital letters. Too late now...

What also prevents us from using the CALS-Table-Editor is a "funny" thing
that I noticed in XMLMind: We do not allow text modes directly inside
"entry" in our dtd. This certainly correctly set up in the dtd. But for some
strange reason, XMLMind still enters text nodes by default in entry, of
course causing invalid xml. XMLMind realizes this invalidity only when
saving the document, which is too late. I think when using the
CALS-Table-Editor-command the dtd-validation is bypassed for a "monent"?

Kindest regards
Thomas

 

> -----Urspr?ngliche Nachricht-----
> Von: Hussein Shafie [mailto:hussein at xmlmind.com] 
> Gesendet: Montag, 16. Juni 2008 18:27
> An: Thomas Dumm
> Cc: xmleditor-support at xmlmind.com
> Betreff: Re: [XXE] checkColspecs & adjustColspecs
> 
> Thomas Dumm wrote:
> >  
> > 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?
> 
> Most of the enhancements in v4.0 are related to inclusions. 
> Therefore the answer is yes: The table editing commands of 
> XXE v4.0 allow to edit tables containing included elements. 
> This was not the case with XXE v3 which used to gray out all 
> the table editing commands in such case.
> 
> 
> 
> 
> I'm really sorry but it is very difficult for me to help you 
> making the following macro work. Writing complex macros such 
> as the following one is definitely not recommended.
> 
> Now, I wonder why your CALS table is called "Table" and not 
> "table" (no matter the namespace).
> 
> If your table element were called "table" and "Table", you 
> could have used the CALS table editor rather than the  
> generic table editor. The CALS table editor automatically 
> inserts colspec elements *when* *needed*
> *to* (for example, when a cell spans several columns). See 
> http://www.xmlmind.com/xmleditor/_distrib/doc/configure/html_c
als_table.xml.html
> 
> 
> 
> 
> > 
> > 
> >   <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 &gt; $cscount"/>
> >             <command name="insert" 
> parameter="before[implicitElement]
> > colspec"/>
> >             <get expression="concat(($cscount+1),' ',$cols)"/>
> >             <command name="custom.adjustColspecs" parameter="%_"/>
> >           </sequence>
> >           <sequence>
> >             <test expression="$cscount &gt; $cols"/>
> >             <command name="delete" parameter="[implicitElement]"/>
> >             <get expression="concat(($cscount-1),' ',$cols)"/>
> >             <command name="custom.adjustColspecs" parameter="%_"/>
> >           </sequence>
> >         </choice>
> >       </sequence>
> >     </macro>
> >   </command>
> > 
> 
> 


Reply via email to