[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Re: [Fwd: Re: FrameMaker+SGML and XML data]



At 05:54 PM 9/29/00 +0100, Mark Barratt wrote:
>You simply can't import XML files into FM+SGML (or ordinary Frame
>either). This is not necessarily the end of the story, given that Frame
>is the best existing product for formatting for print from structured
>data - it may be worth going through some hoops to *make* it work.


Mark,
  You gave a good, concise summary of importing and exporting XML to
and from FM+SGML. Let me just add one observation to your remarks in the
paragraph I've quoted above.
  Although XML is merely a set of conventions for using SGML, it does
use a recent enhancement to SGML that FM+SGML does not support. In 
particular, an element with no content can be tagged in XML as
       <xxx/>
while in older forms of SGML, it must be either
       <xxx></xxx>
if the DTD allows the element to have content even though this particular
one happens not to, or simply
       <xxx>
if the DTD prohibits the element from having content, or more, precisely
if the element has declared content EMPTY. When I'm using FM+SGML in an
XML environment, I use the following trick. Instead of element type
declarations such as
     <!ELEMENT xxx - o EMPTY>
I use
     <!ELEMENT xxx - - (ForImplementationOnly?) -(ForImplementationOnly)>
Thus, instead of explicitly prohibiting content for xxx, I say it can
optionally contain a single ForImplementationOnly element and then I
turn around and prohibit ForImplementationOnly within it. Logically, of course,
the effect is that nothing can occur in an xxx, but the end-tag is still
required. Therefore, FM+SGML exports an xxx element with a start-tag and
an end-tag making both SGML and XML parsers happy.
  This trick does not work for object elements such as cross-references
or graphics, because FM+SGML still does not export the end-tag. However,
the FDK can easily provide end-tags for them.
	--Lynne

Lynne A. Price
Text Structure Consulting, Inc.
lprice@txstruct.com
http://www.txstruct.com

** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **