Before I dive into my question, here is my work flow:
I had an unstructured document that I applied structured to using the conversion table and the EDD file. I had to modify the EDD file along the way, which I did; however, when validating elements, I encountered an error that I have never seen before. I tried resolving it by modifying the EDD file but have been unsuccessful. Can someone please offer their expertise on how to go about resolving the error? A thorough explanation is highly appreciated. The error is “Type-content mismatch; element should be a text range.” Please see the screenshot below.
Thank you in advance!
A few elements, in particular tables and table components are only allowed in certain contexts. For example, table cells are permitted only as children of table rows. Rows are only permitted in table headings, bodies, or footings. A table title is only permitted as a child of a table element. A type-content mismatch is the use of such a special-purpose element in a context where it is not permitted or the use of another type of element in a context where one of the special-purpose elements is required. Examples of such a mismatch include a structure in which a table component element occurs outside a table or a container where a table component element is required. Such errors can occur when you change the EDD after a correct structure is created or when the elements created through a conversion table are not of the type defined in the EDD.
In your case, the TableNarrow element is used incorrectly. Is it declared to be a table? Does it occur within a table?
Although it is not related to the error, I notice that your Structure View uses many of the default element names for table components (BODY, ROW, CELL, etc.). You have used your own names as well, so that you have ttn-TableTitleNarrow within TITLE and CellBody within CELL. You can use entries in your conversion table such as TC:P:CellBody to map a body cell to CellBody with no need for the CELL element. See the Structure Developer's Reference Guide for details.
Thank you so much for explaining the error and helping me with mapping CellBody. To answer your questions, yes, TableNarrow is declared to be the table. It is the table design that was created to format the table in a certain way. Also, you are spot on in pointing out that such an error occurred because I used a different EDD (a general EDD file that I intend to use for all the chapters of a book). The idea is to have one EDD file to structure all the chapters of a book in a similar way. The chapter where this error appeared was a bit different than other chapters because it used different table designs whereas I have been working simple default table element, body, cell, row. Say, if the CT table structures the chapters differently, in this case, can one have a single EDD file to make sure that all chapters follow a similar structure? Hoping my question makes sense.
Thank you again Lynne!