Article View: adobe.framemaker.sgml
Article #712Making a valid XML DTD out of a more general EDD?
From: Harald E Brandt
Date: Fri, 19 Sep 2008 11:50
Date: Fri, 19 Sep 2008 11:50
36 lines
2786 bytes
2786 bytes
I have a very well-made EDD that is used for many manuals. It is somewhat largish (45 pages in 9pt Verdana) but it is very flexible and appropriate for many types of documents. It was not made with xml export as a primary goal, so, although I avoided inclusions/exclusions, there is one crucial construct (used in many places) that is not valid in xml, but is valid in sgml. The construct looks like this:
Element (Container): MyElement
General rule: �TEXT�, (Para | ListUnordered | ListOrdered)*
In a DTD, it would be:
�!ELEMENT MyElement
(#PCDATA, (Para | ListUnordered | ListOrdered)*�
In XML however, the so called "Mixed Content" does not allow such a construct.
But, as I understand from <http://www.w3.org/TR/REC-xml/#sec-mixed-content>, it would allow:
�!ELEMENT MyElement
(#PCDATA | Para | ListUnordered | ListOrdered)*� but also: �!ELEMENT MyElement
(MyText, (Para | ListUnordered | ListOrdered)*� Quite long ago, someone
on this forum suggested that I embed the �TEXT� into a container, arbitrarily
named something like MyText, and then use that instead of the �TEXT�.
Then the EDD would export to a valid DTD.
I am reluctant to change the EDD (for obvious reasons), so my question is:
Is it possible to use read/write rules to do this conversion, or do I really have to go to the trouble of an xslt to achieve this?
Any other ideas or suggestions?
(Purpose of XML export: the reason to export to xml is that I am thinking of doing it for translation purposes only. Since Trados is incompatible with FM8 and can't handle Unicode, an xml document would be a much safer bet that any translation agency would be able to handle with proper Unicode. It is also cheaper than translating FM files, and I would guess that the risk of the translation agency fucking up the files is smaller with xml than fm files (right? wrong?). However, it is absolutely necessary to get the whole round trip to preserve exactly everything, including custom ruling of tables, positioning of graphics, equations etc etc. I have yet to see if that is possible.)
Technical Details
Message-ID:
<59b686a8.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!news4us.nl!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: fcc08,7b6fc3c63283a48a,start X-Google-Attributes: gidfcc08,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII From: "Harald E Brandt" <adobe@bragit.com> Newsgroups: adobe.framemaker.sgml Subject: Making a valid XML DTD out of a more general EDD? Message-ID: <59b686a8.-1@webcrossing.la2eafNXanI> Date: Fri, 19 Sep 2008 04:50:31 -0700 Lines: 44 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!news4us.nl!webcrossing