Download 10 - Docu + Design Daube

Transcript
20
Modifications to the default translation
Translating FrameMaker cross-reference elements to text in markup
You may not want your FrameMaker cross-reference elements to remain elements in the
markup representation—you can choose to translate them to text instead. To do so, use
this rule:
fm element "fmtag" unwrap;
where fmtag is the FrameMaker element tag for a cross-reference element.
For more information on these rules, see “fm element” on page 397 and “unwrap” on
page 461.
Maintaining attribute values with FrameMaker
FrameMaker can maintain values for ID and IDREF attributes so that your end users do
not need to keep track of the values. If you want to let the software do so, you may choose
also to prohibit your end users from changing the values of these attributes.
For information on how to maintain this control, see “Creating read-only attributes” on
page 244.
Translating external cross-references to and from XML
The source of an internal cross-reference is completely identified by the value of its ID
attribute. Hence, internal cross-references are specified with IDREF attributes. To identify
the source of an external cross-reference, though, the file name of the containing document
is also needed. As explained on page 323, when FrameMaker saves a document as SGML,
it avoids the need to export a file name by converting external cross-references to text.
When FrameMaker saves a structured document to XML, it preserves cross-reference
elements for external cross-references, using the srcfile attribute to export the source’s
file name. Within FrameMaker, an external cross-reference links one FrameMaker
document to another FrameMaker document. An exported cross-reference can refer either
to the FrameMaker document that was the original cross-reference source, or to a
corresponding XML document. For example, suppose the source of an external crossreference is an element with its ID attribute set to BAAHDJJE that occurs in the file
c:\myproject\manual\intro.fm. If the name of the cross-reference element is xref
and the cross-reference format is not exported, by default FrameMaker exports the crossreference as:
<xref srcfile="file:///C:/myproject/manual/intro.fm#BAAHDJJE">
If you save the file containing the cross-reference source to XML, you can choose instead
to set the srcfile attribute to refer to the XML version of that file. You specify this option
in the application definition in structapps.fm or another application definition file rather
than with read/write rules. Insert an ExternalXRef child in the XMLApplication element
for the application you are using. In this ExternalXRef element, insert a
ChangeReferenceToXML child. Finally, insert an Enable element into the
ChangeReferenceToXML element. Make sure you restart FrameMaker or use the File >
Translating Cross-References
326