Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

DTD parser bug or what ?

Advocate ,
Nov 23, 2011 Nov 23, 2011

Copy link to clipboard

Copied

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

TOPICS
Structured

Views

1.0K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Nov 23, 2011 Nov 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

Votes

Translate
Advocate ,
Nov 23, 2011 Nov 23, 2011

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 23, 2011 Nov 23, 2011

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines