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

EDD to DTD conversion

New Here ,
Oct 31, 2008 Oct 31, 2008

Copy link to clipboard

Copied

I am using FM 8 on Windows XP Pro and just working through the Getting started with structure example. It's a breeze until I get to the "Building the structured application" topic. Then, whenever I try to save the EDD as a DTD, I get these XML parsing errors:

Invalid document structure
The main XML document cannot be empty
Syntax error
Parsing aborted

I also tried reading in some of the many EDD files loaded with the application and saving them as DTD, but they have parsing errors as well. Does anyone have any ideas what is going wrong here?

Cheers,

John
TOPICS
Structured

Views

1.5K
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
New Here ,
Nov 03, 2008 Nov 03, 2008

Copy link to clipboard

Copied

Hi John;

Well Martti's going to be more of an expert, but I can suggest two things:


  • Your error message says "main XML document cannot be empty" so it looks like Frame is expecting to find some structured Frame file that follows your EDD. Try creating one first then see if you can generate the DTD from that file, rather than from the EDD. (You'll need to create an empty Frame template than import the EDD into that template first).

  • Second, I usually find that it's much easier to write the DTD first then import it as an EDD. EDDs have multiple purposes (both structure and formatting) so they can be a bit harder for me to read. You can do things either way, so long as you end up with both a DTD and an EDD.


Hope this helps...

David Blyth (The UNIX and VI Dinosaur)
Staff Technical Writer
QUALCOMM - Standard Disclaimers Apply

Only 149,999,949 more years of Ruling The Earth to go
-------------------------------------------------------------

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
Mentor ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

John,

I'm not familiar with this example you are working with so I was hoping someone else would know right off what the problem is. It doesn't seem that anyone knows for sure though, so let me note this... the error you are receiving seems quite strange for the action you have described (ie, convert EDD to DTD). I don't understand why you would get an XML parsing error when saving a DTD, because a DTD is not XML. What steps are you taking to initiate this conversion?

Russ

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
Contributor ,
Nov 04, 2008 Nov 04, 2008

Copy link to clipboard

Copied

Hi John,

Sounds a bit odd..like you would try to write out EDD as an XML instance or something.

Did you use "StructureTools -> Save as DTD" command from menu to save the edd as DTD?

If you did, did frame ask what application to use?. If it did, it sounds like the edd you are using is pointing to an application that is unknown to frame (defined be StructuredApplication-element in the beginning of the edd, if this is missing then frame cannot determine eaht read/write rules to use). This leads to next dialog box that would ask whether the DTD is written as SGML or as XML.

Make sure you have following steps done before writing out EDD as DTD:

1. Make the EDD and the application rw-rules file (rw-rules defines the mapping between frame and xml world)
2. Add the application details (application name and rw-rules file is enough now)to structapps.fm
3. Add the application name to EDD with StructuredApplication-element)
4. Save as DTD should work now.

Hope this helps,
Martti

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
New Here ,
Nov 06, 2008 Nov 06, 2008

Copy link to clipboard

Copied

Hi,<br /><br />All I was doing was religiously following the example in FM 8 help, topics under Processing XML > Migration from unstructured FrameMaker > Getting started with structure. This involves building a simple EDD and testing it -works fine. Adding formatting - works fine. The DTD creation does not mention any rules file. These are the instructions:<br /><br />First, you need to create a document type definition (DTD) that matches the EDD.<br /><br />To create a DTD:<br /><br />1. Open the proposal_edd.fm file in structured FrameMaker.<br /><br />2. Select StructureTools > Save As DTD. Specify the file name (proposal.dtd) and where you want to save the file, and then click Save.<br /><br />3. In the Use Structured Application dialog box, leave the default selection, <No Application>, and click Continue.<br /><br />4. In the Select Type dialog box, select XML and then click OK. The DTD file is written out to the location you specified.<br /><br />Step 4 is where it falls over and gives the error. From what you say, it seems I need a rules file, but there is no help for this in FM. Can you point me some resource?<br /><br />The FM tutorial implies that using no application (and thus no rules) should generate a DTD file from the EDD. I've looked at the structure of EDD and DTD files and can see the relationship, but obviously to have an automated way to generate the DTD would be great!

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
New Here ,
Nov 06, 2008 Nov 06, 2008

Copy link to clipboard

Copied

Embarrassing update...I went back and double-checked everything that I had done. I found that it was a mistake on my part. I had used a space in the name of my top level element and of course that is not valid in XML. I corrected it and the DTD conversion works just fine.

Thanks for your comments and I'll double-check everything before asking any more questions!

Cheers,

John

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
Mentor ,
Nov 06, 2008 Nov 06, 2008

Copy link to clipboard

Copied

LATEST
John,

No problem, this really can be blamed on FrameMaker too. Whenever it is working with XML and related files, FM uses a third-party Xerces XML validator to do lots of the XML work. This is great when everything works, but when there are errors, apparently FM simply reports the error text verbatim that it receives back from Xerces. In many cases, it can be cryptic to decode, especially as there is no documentation for it with FM. So, when you get these errors, sometimes it can be real tricky to figure out where the actual problem is. It seems that only experience is adequate for being able to recognize and solve these kinds of problems quickly. You see in this case, though, nobody here really knew the answer, presumably because nobody here had followed your particular sequence before and therefore didn't have the error registered in their "mental" FM reference.

Russ

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