Skip to main content
Van Kurtz
Inspiring
March 8, 2012
Question

Strange things when saving to XML, disappearing tmp files

  • March 8, 2012
  • 1 reply
  • 1559 views

I am losing my mind with this one and am hoping someone has a clue to what the problem is.

I do not normally save files to XML but have done a lot of experimenting with the process. Several months ago I had a good workflow that saved my structured documents to XML with no problems. All the elements came out as expected.

Now I am trying to do the same thing but apply an XSL transform as post processing. The idea is to transform my structure into one that satisfies a different DTD. In most cases, the end result is correct, but many errors are generated in the process. Most errors are things like expected an element name and expected enumeration separator or missing parenthesis. The odd thing is that FrameMaker is referencing a tmp file in a particular folder, but I cannot find it. So, it is difficult to see what the problem is. I have even tested the process using a blank template file with just a root element in it and maybe a child inside that. I get the same set of errors at what appears to be the same line numbers. BUT no tmp file. For the record, I have hidden files and folders showing.

In most cases, the result is OK. The ONE exception I have found is related to cross-reference elements. My cross-reference elements appear in the XML without termination, even though the EDD requires that they have no content.

I even tried using a different structure application, one that worked a few months ago, and the results are the same. I checked some XML output that I did a few months ago, and all the cross-reference elements were properly terminated as <XReference/>.

If I can find a way to see those missing tmp files, maybe I could see a solution. There is a need to solve this problem, because we need to export to XML to then import that XML into a CMS system that uses a different DTD.

I am using FrameMaker 9.0p255.

Thanks for any clues that anyone might have,

Van

This topic has been closed for replies.

1 reply

Participating Frequently
March 9, 2012

Hi Van,

Keeping everything same & just removing the export XSL setting from the Application, does this give you an XML file. If yes; on inspecting this file, do the errors correspond to this file ?

Regards,

Tarun Garg

Adobe FrameMaker Engineering

Van Kurtz
Van KurtzAuthor
Inspiring
March 9, 2012

Tarun,

I removed everything from the structured application, except the read/write rules. I get the same errors. A tmp file WAS created but it did not have the same name as the one listed in the error log. I opened it anyway, and it was a mif file; it was clear that the errors did not relate to it (the errors referenced character positions longer than the corresponding line. An XML file was created, but it had a lot fewer lines than referenced in the error log. The XML file was the correct and valid structure as in the Frame file.

I even tried saving to XML WITHOUT using a structured app, and got the same thing.

Any other thoughts?

Thanks,

Van

Van Kurtz
Van KurtzAuthor
Inspiring
March 28, 2012

Tarun,

As you can see from the date of this post, I have been working with this problem for a long time. At first, I thought it was just annoying and had no effect; the output was always correct. But I have since discovered that it does have an effect. I believe I have discovered the cause of the problem.

I have always assumed that a valid FrameMaker document exports to a valid XML document. Therefore, I always thought that a DTD was not necessary to export to XML. This is something I rarely do, and have only really done it to see how to do it.

My EDD has several elements with mixed content, and that mixed content allows TEXT in various places within the content. This is all well and good in an EDD, but not an XML DTD; XML requires that optional TEXT (PCDATA) be placed at the beginning of the content rule. So, when the EDD is exported to a DTD, that DTD has to be edited to make it compliant with the XML specifications.

The structured application that I created to export to XML did not specify a DTD. So, FrameMaker created one in the background, which did not satisfy the XML specifications, which generated the errors I was seeing. Because the DTD was not proper, the resulting XML was sometimes OK and sometimes not.

So, the solution was to export a DTD from the template, edit it to satisfy the XML specifications, and include it in the structured application. Then, all works as expected.

Regards,

Van