General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Inserting a table from the table menu results in an invalid table

  • dcramer

    Inserting a table from the table menu results in an invalid table

    Participants 4
    Replies 5
    Last Activity 13 years, 3 months ago

    In DocBook there are two kinds of tables:

    and .

    s have 's as immediate children and <informaltable>s don't. When I insert a table using the Table menu or Table button and select “table” (rather than “informaltable”) as the “Table type” it inserts a table without a title. Because of the difficulties of moving the cursor in XMetaL especially in tables where the markup is hidden even in tags-on view, users have trouble putting the cursor as the direct child of the table so they can manually insert a title. But the Insert Table dialog should put in a title for them. Is there something I need to add to my customization (the ctm I suspect) to make this happen? </informaltable>

    Reply

    Derek Read

    Reply to: Inserting a table from the table menu results in an invalid table

    A quick test here with one of the versions of DocBook that I have (OASIS version 4.1.2) shows that the following will insert a table (not informaltable) that includes the title element.

    I tested with the 5.1 release of XMetaL Author Enterprise, but I don't think this particular functionality has been touched for a long time.

    My test:
    1. Put the DocBook DTD files in their own folder that does not include CSS, CTM and MCR files.
    2. File > New > General (tab) > Blank XML Document (template).
    3. Browse to and select docbookx.dtd, letting XMetaL auto-generate the CSS and CTM files.
    4. Insert an

    element. XMetaL decides it should have a so it sticks that in too.
    5. Move the insertion point after the
    then select the Insert Table option from the Table menu.
    6. In the Insert Table dialog leave all the options as default (2 cols, 2 rows, no header, no footer).
    7. Clicking the OK button inserts a table with the following markup (I've manually pretty printed this for clarity here):

    [code]



         

       
       
     


    [/code]

    A couple of guesses about what's different:

    a) You have a modified DTD.
    b) Some setting in the CTM or a script is mucking with this.
    c) ?

    Reply

    dcramer

    Reply to: Inserting a table from the table menu results in an invalid table

    Ok, the only thing in the ctm file related to the table element is the following:

       
          table
                 
           
           
         
       

    I deleted my ctm file and let xmetal generate it. No change when I insert a table.

    I have customized the DTD (ours is based on DocBook 4.5). For tables we add an attribute. I tried removing the table stuff from our dtd and reopening xmetal. Still no table titles when I insert a table.

    How does xmetal know to add a title to tables? I assume it's because it sees that title is a required child of table. Title is required…if I try to validate using one of its titleless tables, it gives a validation error.

    Thanks,
    David

    Reply

    Derek Read

    Reply to: Inserting a table from the table menu results in an invalid table

    Difficult to say what the issue is as the DTD has been modified (though just adding an attribute should not make a difference — in theory). Can you send the DTD to XMetaL Support so they can test with it?

    Reply

    dcramer

    Reply to: Inserting a table from the table menu results in an invalid table

    Sent.

    Thanks,
    David

    Reply

    dcramer

    Reply to: Inserting a table from the table menu results in an invalid table

    Derek and I resolved this (for my purposes) offline. It turns out that beginning with version 4.3 the DocBook DTD supports both CALS and HTML tables. This seems to be the cause of the problem because by adding the following to my DocBook variant, (which turns off the html-tables feature in DocBook), the problem went away.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support