Skip to main content
Inspiring
November 23, 2010
Question

CALS tables as external file entities

  • November 23, 2010
  • 2 replies
  • 960 views

Hi,

I'm struggling with a problem while reading in XML fileset through importing XSL transformation (defined in structapps).

I've got a main xml document + bunch of separate cals tables, each in it's own file.The location of those tables in the main document are marked with special element.

My import xsl converts those elements to entities and makes local entity declarations creating something like (skipping xml decls etc..):

<!DOCTYPE x [<!ENTITY table1 SYSTEM 'table1.xml']>

<X ...all schema + namespace declarations..>

<para>zzz</para>

&table1;

....

</X>

file entity table1 has <table> as root element.

XSLT goes fine and FM does not generate any validation errors against the schema. I've checked the tmp-file (created by XSLT) and it looks ok.

But FM refuses to create the tables and flags errors like "Cannot create a new table for the FrameMaker element (table)" and same for every element in cals table.

Tables that are in the main document already cause no hick ups. Also, if I change the content of the file entity to , say, <para>, it works.

BR, Martti

This topic has been closed for replies.

2 replies

Michael_Müller-Hillebrand
Legend
November 23, 2010

Martti,

AFAIK in the CALS model the element <table> is just a container, and the <tgroup> is the element which results as a FrameMaker table. Could this be a reason for the hickups you see?

- Michael

MarttiPAuthor
Inspiring
November 23, 2010

Hi Michael,

I use the table model in Frame where table is the actual table and tgroup gets unwrapped by r/w-rules. Tables already in the main xml document (not from file entities) have been working ok all the time.

Funny thing is that wrapping table into para in file entity solved the issue (my schema allows tables in para's too, so not a problem from that side). But I'm curious to understand why this happens.

My understanding of frame's internal behaviour during xml read is that the XSL processing happens outside of frame, frame invokes xalan and passes the xml "as-is" to it and takes the result, parses and validates it. Then into framemaker through r/w rules.

Could it be that that when parser hits a file entity reference and replaces it with actual content, this interferes how frame interpretes the result. Addinf a wrapping element seems to "help" frame to recognize the table. I tested briefly with file entities having just para-type content and frame ate then with no sweat.

Martti

Michael_Müller-Hillebrand
Legend
November 23, 2010

Hi Martti,

I can imagine that FrameMaker chokes if the top-level element is an object like a table and not a container. But, the XML after XSL preprocessing no longer has those entities, they are resolved into a single XML file, aren’t they?

So, maybe it depends on what comes before the through the XSL, well, maybe you did it that way... Just guessing, though.

- Michael

MarttiPAuthor
Inspiring
November 23, 2010

I did some further testing.

Weird behaviour..if i wrap the table into a para-type element in entity file, everything works. A problem with parser in Frame?.

M