Skip to main content
Inspiring
May 12, 2014
Answered

Parser error message: Required attribute 'cols' was not provided

  • May 12, 2014
  • 1 reply
  • 499 views

I'm having trouble with a ditamap in FM 12 because two of the files refuse to save. They send up the parser error message "Required attribute 'cols' was not provided".

They both contain tables imported by conref. The error seems to arise on the tgroup element. Yet the Attributes table for tgroup does not seem to contain a cols attribute and I can't see where to define it or how.

In another DITA editor, XMLMind Personal Edition, I have no trouble opening and saving both the destination and imported conref source files. They seem to have the cols attribute correctly defined.

What is going wrong in FM and how can I fix it? It's annoying that a big expensive tool should be so much harder to use than a free one!

Thanks to all,

Elisa Roselli

Cambridge Imaging Systems

This topic has been closed for replies.
Correct answer Archaeopteryx

I've found a solution, although it is rather cumbersome:

1. In the destination file of the conref, go into the code view and find the <tgroup> element after the conref.

2. Type a space after tgroup. A list of attributes appears.

3. Select cols in this list. The tgroup element now reads <tgroup cols="">.

4. Enter the number of columns in the table between the "", e.g. <tgroup cols="2">.

5. Save the file. It now generates without parser errors.

You'd think that for all this automation, you wouldn't have to do this manually for every file that includes a table by conref. But you'd be wrong.

Cheers all,

Elisa Roselli

Cambridge Imaging Systems

1 reply

ScottPrentice
Inspiring
May 12, 2014

Hi Elisa...

This is likely an error in the structure application, but may be a bug in FM itself. If you wanted to send me the two files I'd be happy to take a look (info AT leximation.com). The <tgroup> element does have a @cols attribute, it's just not visible in FM (I guess because you can't set it manually). This gets set automatically by the following read/write rule when you work with a table ..

attribute "cols" is fm property columns;

.. but when you conref a table, the default DITA plugin should set that .. perhaps that's not happening. Note that the <tgroup> element is actually the "table" object in FrameMaker. The <table> element is just a wrapper around the table.

Tools that do more are always more complicated than those that do less. That's no excuse for this not working right, but that's not an uncommon situation. (BTW .. DITA-FMx doesn't have any problem with a conreffed table.)

Cheers,

…scott

Inspiring
May 13, 2014

Hi Scott,

Thanks very much for your answer.

In practice there's not much I can do about it -. I regret I cannot afford DITA-FM at this stage. However, I have reported it to FrameMaker support as it does look like it may be a genuine bug at their end (since other programs seem not to have the problem).

Best regards,

Elisa Roselli

Cambridge Imaging Systems