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

DTDs in Entity form to EDD

New Here ,
Mar 10, 2008 Mar 10, 2008

Copy link to clipboard

Copied

Sure hope someone can give me some direction on this. I have Framemaker 7.2 in Windows. I'm working on Workpackage pubs and have been provided the DTDs which seem to be all entities. There's one main file which is like a catalog which refers to 9 others. All have the extension .ent.html. So I believe this is a modular DTD.
First I don't know how to use the HTML; do I need to adapt them in some way to get rid of the HTML extension? And then, how to use a modular(if that's what I have)DTD to open as an EDD. Based on the Developer's Guide, while writing the Application file, seems I need to insert the Entities tag and EntityCatalogFile element to reference these files. It's not clear how to put it together. That is if this is even how to handle this DTD.
Can someone tell me if I'm on the right track here? Please.
Carron
TOPICS
Structured

Views

1.1K
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 ,
Mar 11, 2008 Mar 11, 2008

Copy link to clipboard

Copied

Hi Carron,

Frame's XML parser needs a way to find the DTD and it's components when XML is read/written to/from Frame.

If public identifiers are used in XML declaration in an XML instance.

Example (let's use dita, it also uses modular dtd's). a topic xml file declaration looks like (w/o tag delimiters):
!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd"

If the instance and the dtd file (topic.dtd) are in a same folder, the parser is able to use it right away. This is not the case usually, so frame must "help" the parser to figure out where the physical file "topic.dtd" is in the file system.
This is done with the public identifier "-//OASIS//DTD DITA Topic//EN" definition in the structapps.fm.

It is possible to use absolute paths with system identifiers, but that approach makes portability a pain in the neck.

During write, writer rw-rule can be used to re-create the doctype declaration. Here, only the main dtd needs to be reconstructed.

Now, the DTD might be modular, like in case of dita. In the DTD file, the external file entity definitions are like this:

!ENTITY % ui-d-dec PUBLIC
"-//OASIS//ENTITIES DITA User Interface Domain//EN"
"uiDomain.ent"

so again, a public identifier and system identifier (+the entity name).

and they are "invoked" with line:
%ui-d-dec;
in the dtd

If the entity file is in the same folder as the main dtd, parser is able to find it. If not, you need to tell the location in structapps.fm

In "normal" XML systems, these things are handled with XML catalogs, but frame uses the structapps-approach.

The html-extension...hmmm...did you get the dtd through email..in some cases the mail sw thinks that the dtd modules are html and adds the extension. Typically the extensions are either ent or mod (well, they can be anything.., parser does not care)

So, shortly...yes, you are on the right track..;)

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 ,
Mar 12, 2008 Mar 12, 2008

Copy link to clipboard

Copied

Martti, Thank you for responding.
These files came from the government NATEC (for military pubs) website as a zipped file. When I unzipped, they were all html files. Viewing in Notepad, it shows the HTML; the main DTD starts as:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>milstd1.dtd</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="livedtd.css">
<STYLE TYPE="text/css">
STRONG { font-weight: bold; color: red;}
.COMMENT { text-align: left; font: 10pt Courier; font-style:italic; color: #A8A8A8;}
</STYLE>
</HEAD>
<BODY onLoad="parent.file.document.open();parent.file.document.write('<BODY TOPMARGIN=0><B>milstd1.dtd</B></BODY>');parent.file.document.close()"><?LIVEDTD ENDHEAD?>
<PRE><?xml version='1.0' encoding='utf-8'?>
<SPAN CLASS="COMMENT"><!--<!DOCTYPE manual [
--></SPAN>
<SPAN CLASS="COMMENT"><!-- PUBLIC "-//USA-DOD//DTD MIL-STD-3001-1 TM Assembly Draft XML V3 07142006//EN"--></SPAN>

Do I go through and delete all HTML tags? or is there some other way to convert it from html?

I looked at the DITA application you mentioned and have written my app file inserting ENTITIES tag and put all the Public IDs and System IDs in place. The main DTD is milstd1. All are in the same directory. In FM, when I try to create an EDD, in Structure tools, Open DTD, I get lots of errors 'expected a markup declaration' and 'expected parameter entity name'. I'm hoping these will be resolved once I get the html problem fixed.

Sure appreciate the help; I feel like I'm getting closer.
Carron

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 ,
Mar 12, 2008 Mar 12, 2008

Copy link to clipboard

Copied

Hi Carron,

It looks that you have loaded the DTD as a html file.
I'd say you should try to get the dtd's as correct files. The clenaup work with the html version is tedious and error prone.

I don't know any sw that would do a html to dtd coneversion.

The errors you are seeing are caused by syntax errors, so again, try to get the "real" files.

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 ,
Mar 12, 2008 Mar 12, 2008

Copy link to clipboard

Copied

Martti,
Yes that would be best, start with the REAL files. I've requested my supervisor to try to get them. Can't do anything til then.
Thanks so much for the help.
Carron

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 ,
Mar 19, 2008 Mar 19, 2008

Copy link to clipboard

Copied

I have the real DTD and entity files now, not HTML. Been researching how to insert them into the Apps file. I put them into the ENTITY element with the PUBLIC ID and FILENAME. Then IMPORT > Element Definitions. Seems to work alright with just a few bugs. But when I view the resulting EDD file, there are all the elements from all the entity files but also several elements that are one or two-letters. I don't know what these are. And the highest-level element is 'fd'.
Is there some other way I should have inserted this DTD and entities into the app file? Do the entities need to be converted somehow like the dtd?
Has anyone out there worked with Workpackage pubs?, individual WP files that will eventually be combined into one document. I'm starting to think I need to combine all Workpackages into one document now and then add structure using the provided DTD set. The highest-level is supposed to be 'manual'.
Carron

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 ,
Mar 19, 2008 Mar 19, 2008

Copy link to clipboard

Copied

Carron,

What are those few bugs that frame parser reports while reading the dtd?
The edd should contain all elements from all entities (except possible conditioned one's).

Highest level elements must be set manually in edd any, the dtd parser cannot know them.

Does the general rules in elements in edd correspond to dtd structures?

Difficult to say more w/o seeing the dtd files..

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 ,
Mar 19, 2008 Mar 19, 2008

Copy link to clipboard

Copied

The error I get when creating the EDD from the DTD is "Element entrytbl in the DTD appears to be a non-standard table definition. In a valid FM table, the heading must precede the body and the body must precede the footing". doesn't give me any clues.<br />The EDD does contain all the elements and the general rules look right. But there are all those other 2-letter I can't identify, the first of which is: <br />Element (Container): fd<br />Valid as the highest-level element.<br />General rule: (fl)*<br /><br />Element (Container): fl<br />General rule: (<TEXT> | fr | rad | lim | ar | stk | cases | eqaln | fen | pr | in | sum | a | b | it | rm | blkbd | ig | sc | ge | ty | mit | g | bg | vmk | vmkr | vsp | hsp | tu | rf | inc | v | dy | fi | unl | ovl | unb | ovb | sup | inf | phr)*<br /><br />I thought the DTD dictated the highest-level element. SO I just inserted the Highest-level Element tag into the element 'manual'. Wow seems to work. Ishould be able to structure the document now. Hey thanks, 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
Contributor ,
Mar 19, 2008 Mar 19, 2008

Copy link to clipboard

Copied

Hi Carron,

The entrytbl (used in many dtd's) allows nesting of tables, ie. a table cell can contain a table. This is not supported in frame. What you should do (makes your edd a bit less crowded) is to drop the entrytbl element in rw-rules:

element "entrytbl" drop;

The "short" elements looks like (just trying to interprete the names..+guessing) some kind of math markup model. Again, framemaker only supports it's own equation editor, so if you don't need that, you can drop the element "fd" in rw-rules.
Check your edd if any general rule in other elements contain the fd element (i'd guess not, and that's why frame "raises" the fd element to be root candidate)

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 ,
Mar 23, 2008 Mar 23, 2008

Copy link to clipboard

Copied

LATEST
Martti,
Well that makes sense why the EDD can't use it. Ok I'll get rid of it with the RW rules. And the others too.
Thanks,
Carron

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