过滤内容
你可以通过 metadata 中的信息来确定忽略的内容。
在默认的情况下,包含所有的内容。
在所有的便利里面,必须设定至少一个忽略的参数来将其过滤出来。
-
Create a DITA filter file in the directory you want to add
the file to. Give the file a descriptive name, such as
"audience-flag-build.ditaval".
-
Open the file, and type below content into it:
<?xml version="1.0" encoding="UTF-8"?>
<val> </val>
-
Define the property you want to exclude:
-
Find the attribute name. Type a new property for
exclude by adding a new line <prop att="" val="" action="exclude"/>.
-
Select the attribute ("audience", "platform",
"product", "otherprops") you want to exclude based
on.
For example, "audience".
-
Type the value you want to exclude.
For example, "programmer".
You can define more properties by following the steps
above. The final ditaval file with the example values should be like
this:
<?xml version="1.0" encoding="UTF-8"?>
<val>
<prop att="audience" val="programmer" action="exclude"/>
</val>
-
When you publish output from the topic or map, specify the
filter file you want by using the parameter
/filter:{args.input.valfile} for the output options.
Content is excluded only when all the values in a single
attribute are set to exclude. For example, if you have a list item
that applies to programmer and administrator audiences, and you
exclude programmers, the list item will remain in the output
because it still applies to administrators.