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 used 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 [mess]ing 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.)
[edited by host]
>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 used 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 [mess]ing 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.)
[edited by host]