View Categories

target-filename-words

1 min read

Table of Contents

Syntax #

target-filename((foldername=foldername;)filename)

target-filename-camel-case(foldername=foldername;)filename)

target-filename-dromedary-case(foldername=foldername;)filename)

target-filename-lower-case(foldername=foldername;)filename)

target-filename-words(foldername=foldername;)filename)

foldername (optional)

name of the directory containing the file

filename

name of the file

Purpose #

The target filename annotations are used to control chunking of the topics into separate files. The annotation allows the file name to be specified, and optionally the folder name as well. If no folder name is specified, the file will be created at the top level.

Typically, this annotation is applied on elements which have also had a title annotation applied. Thus, a topic is identified, and its file name is established. The text of the file name usually comes from the paragraph text to which the annotation applies. In this manner, the file name is based on the topic title.

The variations of the target file name annotations apply different filtering logic to the file name parameter. Consider the text “vegetable recipes”:

annotation description computed file name
target-filename(\*.dita) no filtering vegetable recipes.dita
target-filename-camel-case(\*.dita) capitalize first letter of every word VegetableRecipes.dita
target-filename-dromedary-case(\*.dita) capitalize first letter of every word but the first vegetableRecipes.dita
target-filename-lower-case(\*.dita) lower case text vegetable_recipes.dita
target-filename-words(\*.xml) replace funny charaters with an underscore vegetable_recipes.xml
target-filename((foldername=topics;)\*.dita) no filtering topics/vegetable recipes.dita

The \* syntax is used within annotations to reference the full text of the current element. In the scenarios above, we can imagine that there is a paragraph element with content “vegetable recipes”.