Skip to main content
Participant
June 9, 2010
Answered

Error on import of XML into FM8

  • June 9, 2010
  • 1 reply
  • 1370 views

Hi All,

To make my structured application available to a wider user group, I want to reference a dtd via a URL rather than a fixed path on local file system.

I'm using FrameMaker 8.

Currently I have the following line in the xsl stylesheet that is applied to the XML upon import to FrameMaker:

<xsl:output method="xml" standalone="no" doctype-system="X:\mydir\mydtd.dtd" />

I want to change this to:

<xsl:output method="xml" standalone="no" doctype-system="http://www.mysite/mydtd.dtd" />

However, this gives me the following error in FM8 when opening the XML:

--------------------------------------------------

XML Parser Messages (Document Prolog)

Parse error at line 2, char 92: Error in processing external entity reference

Parsing aborted.

--------------------------------------------------

Any advice?

Thanks,

John

This topic has been closed for replies.
Correct answer Michael_Müller-Hillebrand

Hi Michael,

Here's the snippet of the XSL I now use to set the doctype:

<xsl:output method="xml" standalone="no" doctype-system="xmlfragment.dtd" />

Here's the screenshot of my structured app in FM8:

Here's the XML Read Report Log:

Rgds,

John


John,

I see you have the Read/Write rules search path specified (which seems to be of no use because you specified a full path for the R/W document).

Now add the Entities search path specifying the folder of the DTD. Then FrameMaker should be able to find it.

I usually specify the DTD with a full path as well, having the path in a variable, so editing it is easy.

- Michael

1 reply

Michael_Müller-Hillebrand
Legend
June 9, 2010

Hi John,

The quick fix would be to change the DTD reference to

doctype-system="mydtd.dtd"

Next, in your structured application you would define a default entity search path, pointing to the folder where you keep your structured template and the DTD. FrameMaker will look there if the original DTD reference does not resolve.

Are you using any XSL preprocessing while opening the XML file? This would change the game a little bit.

- Michael

Edited after re-reading the full question

jaw111Author
Participant
June 9, 2010

Hi Michael,

Yes, the XSL snippet I included is taken from the XSL that is used during preprocessing upon opening the XML.

I tried what you suggested, but get an error.

I guess this is because the processed XML is stored in a temp directory, so the dtd is not available in that location

John

Michael_Müller-Hillebrand
Legend
June 9, 2010

Am 09.06.2010 um 16:44 schrieb jaw111:

Hi Michael,

Yes, the XSL snippet I included is taken from the XSL that is used during preprocessing upon opening the XML.

OK John, with XSL preprocessing an intermediate XML file is created in your TEMP folder. FrameMaker opens the XML from this location and therefore most relative paths to DTDs will fail.

The resolution I use is to add a simple local reference to the XML resulting from the XSL preprocessing using the instruction

This DTD must be valid for the XML after the XSL preprocessing, of course. Also make sure there is no older version of your DTD in the %TEMP% folder, because if FrameMaker finds something at the original location it will not go and look in the search paths.

HTH,

- Michael