Skip to main content
4everJang
Legend
November 23, 2011
Answered

DTD parser bug or what ?

  • November 23, 2011
  • 1 reply
  • 1086 views

Hello all,

I am trying to create a structured application, starting from an EDD. When I select StructureTools > Save as DTD, the DTD is written but the console shows errors parsing the DTD. I tried to figure out why the errors appear but I don't see it.

EDD:

Element (Container): Index

     General rule:     IndexHeader, <TEXT>

DTD:

<!ELEMENT Index     (IndexHeader, #PCDATA) >

But Frame's parser does not accept it. The message is "Expected an element name" and it points to #PCDATA.

The DTD was written, but parsing was aborted. I don't know what it means for my structured application that parsing was aborted. Will I run into problems when passing information to XML and back? Is there an obvious reason why the <TEXT> element is accepted in many occasions but not in the above definition? Is there something about DTDs that is handled in a non-standard way by Frame?

Jang

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

Jang,

If you have XML and »mixed content« (menaing anything with #PCDATA resp. <TEXT>) the XML standard requires this general rule:

(#PCDATA | IndexHeader)*

#PCDATA has to be first, all other elements must be listed using the or operator and everything must be optional (*).

If you want to have a stricter rule inside FrameMaker, you can use text conditions to switch the EDD between EDD-mode and XML-mode. I use this method, because I create the DTD always by saving from the EDD.

- Michael

1 reply

Michael_Müller-Hillebrand
Legend
November 23, 2011

Jang,

If you have XML and »mixed content« (menaing anything with #PCDATA resp. <TEXT>) the XML standard requires this general rule:

(#PCDATA | IndexHeader)*

#PCDATA has to be first, all other elements must be listed using the or operator and everything must be optional (*).

If you want to have a stricter rule inside FrameMaker, you can use text conditions to switch the EDD between EDD-mode and XML-mode. I use this method, because I create the DTD always by saving from the EDD.

- Michael

4everJang
4everJangAuthor
Legend
November 23, 2011

Hi Michael,

Thanks for the info. I did not know that detail in the XML standard. I will have to either change the general rules as you indicated or wrap the <TEXT> section into another element then.

Ciao

Jang