Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

34 Automating Mif2Go conversions > 34.8 Renaming output files for automated systems > 34.8.4 Using paragraph formats to name output files > 34.8.4.1 Constructing file names based on paragraph content


34.8.4.1 Constructing file names based on paragraph content

You can specify names for HTML or XML output files by designating a FrameMaker paragraph format to use for this purpose, and listing the format name in the [HTMLParaStyles] section. The content of each paragraph in this format becomes the base name of a new split part:

prefixed with whatever you specify for [StyleFilePrefix],

suffixed with whatever you specify for [StyleFileSuffix], and then

followed by the file extension.

To use a paragraph format to name split files, assign the FileName property to the format:

[HTMLParaStyles]

paratag = FileName

Object ID replaces unusable content

If the content of a paragraph to which you assign the FileName property is empty, or consists only of characters that are not valid for file names, Mif2Go uses the ObjectID of the paragraph for the file name instead (see §18.4.1 Understanding how split and extract files are named), along with any prefix or suffix you specify for file names (see §34.8.4.5 Specifying a file-name prefix or suffix).

Ensure valid file names

These cobbled-together split-file names are guaranteed to consist of valid file-name characters only with the following default setting:

[HTMLOptions]

; UseRawName = No (default, make [HTMLParaStyles] FileName valid)

; or Yes

UseRawName = No

When UseRawName=Yes, file names generated from paragraphs retain the full content of the paragraph, including any whitespace and punctuation; that is, unless the paragraph consists only of non-alphanumeric characters, in which case Mif2Go uses the ObjectID of the paragraph for the file name.

When UseRawName=No, all whitespace and punctuation are removed from the file name, unless you set either or both of the following options to Yes; if you set either option, we can no longer guarantee that the generated file names will be valid:

[HTMLOptions]

; When UseRawName=No, allow underscores and spaces to be passed

; through from headings with the FileName property as follows:

; KeepFileNameUnderscores = No (default, remove underscores) or Yes

KeepFileNameUnderscores = Yes

; KeepFileNameSpaces = No (default, remove or change spaces) or Yes

KeepFileNameSpaces = Yes

When KeepFileNameSpaces=No, you can choose to replace each space in the file name with some other character:

[HTMLOptions]

KeepFileNameSpaces = No

; ChangeFileNameSpaces = No (default; if not kept, remove) or

; Yes (if not kept, replace with the FileNameSpaceChar, below)

ChangeFileNameSpaces = Yes

; FileNameSpaceChar = character with which to replace spaces,

;  default '_', used if both KeepFileNameSpaces=No and

;  ChangeFileNameSpaces=Yes

FileNameSpaceChar = _

The default replacement character is an underscore. The setting for FileNameSpaceChar takes effect only if both of the following are true:

KeepFileNameSpaces = No 

ChangeFileNameSpaces = Yes.

The only non-alphanumeric character replaced is the space. All other non-alphanumeric characters are removed. For example:

Basic 40/41/42 Chipset

becomes:

Basic_404142_Chipset

The forward slashes are removed.



34 Automating Mif2Go conversions > 34.8 Renaming output files for automated systems > 34.8.4 Using paragraph formats to name output files > 34.8.4.1 Constructing file names based on paragraph content