Space in the name of root element in a DTD causes an error

Affects: Structured FM7.0

Description

When the only root element in an EDD has a space character in its name, an error message is displayed when exporting it as a DTD ("PUBLIC or SYSTEM required; declaration ignored"), although the space is removed by the RW-rules.

If the space is removed from the root element name in the EDD, the export works without problems

Additional Info & Workaround by Lynne A. Price

This bug affects creation of SGML DTDs but not XML DTDs. I suspect that what happens is that FM first creates the DTD, then it creates a test document that it parses to check for errors. It seems that it uses the name of the first highest-level element defined in the EDD as the document element of this test document and doesn't bother applying read/write rules to this name. Unfortunately, the resulting
error stops the SGML parser from looking at the rest of the generated DTD. Thus, while this particular error message can be safely ignored, when it occurs no other potentially useful error messages are produced.
There's an easy workaround: Just define a new highest-level element at the start of the EDD. Make sure it's tag is one that is valid in SGML. For example, call it Avoidbug. Put in a comment that explains that the element is there to avoid this bug. Then add a read/write rule to drop it: fm element "AvoidBug" drop;

Submitted by: Mario Michlits

Version 1.0, February 5, 2003