can ENTITY ImportedGraphic - be omitted?

Lynne A. Price lprice at txstruct.com
Thu Aug 17 06:31:04 PDT 2006


At 05:45 AM 8/17/2006, Wim Hooghwinkel \(Scriptware\) wrote:
>when FM saves an XML file, it writes the graphics as entitys in the
>header of the XML.
>
>Can this be changed - to keep the graphic references in the XML body?
>
>Problem is, that we want to use some XSLT to preprocess or postprocess
>the XML files and it seems to be impossible to keep the header with the
>entity references. Has anyone yet a work around for this?  (FM 7.2).

Wim,

1) FM can export a graphic using either an ENTITY attribute (default name 
is entity) or a CDATA attribute (default name is file). The value of the 
former is the name of an unparsed entity whose system identifier names the 
graphic file; the value of the latter is the name of the graphic file. If 
the DTD declares both attributes, FM uses the ENTITY attribute.

You can specify the attribute names with read/write rules such as:

     element "image" {
        is fm graphic element;
        attribute "graphicfile" is fm property file;
        attribute "graphicentity" is fm property entity;
        }

These rules allow FM to import files that use either graphicfile or 
graphicentity, but on export it would always use graphicentity.  If you 
want it to export only graphicfile, remove the rule for graphicentity. If 
you want to export using graphicfile, but to be able to import either form, 
you'll need to use different rules for opening XML documents and saving 
documents as XML.

If your DTD happens to declare an ENTITY attribute named entity and you 
don't want FM to use it for exporting graphics, use the rule:

     attribute "entity" is fm attribute;

2) While XSLT cannot simply copy the internal DTD subset of the document it 
is processing, it can generate a new one with entity declarations 
equivalent to those in the original. Use the function unparsed-entity-uri 
to write such a transform.

         --Lynne


Lynne A. Price
Text Structure Consulting, Inc.
Specializing in structured FrameMaker consulting, application development, 
and training
lprice at txstruct.com            http://www.txstruct.com
voice/fax: (510) 583-1505      cell phone: (510) 421-2284 





More information about the framers mailing list