SPFE Documentation | Collections > SPFE Development > Configuring topic sets
Configuring topic sets
Think
The SPFE Open Toolkit (SPFE-OT) processes content in topic sets. The topic set configuration selects topics to be included in topic set content, selects resources that may be used, and specifies how each set will be processed.
The content set configuration specifies the topic sets to be included in a SPFE build and the order they will appear in the output table of contents.
A topic set configuration is an XML file in the /topic-set format.
Plan
- Where do I locate the configuration files
-
The content set and topic set configuration files may reside anywhere in the filesystem that is convenient for the author. References to configuration, source, and other files may be relative or absolute path names. A common setup has the content set configuration file in the working directory, where the spfe command will be executed and log files kept, with topic set configuration files and content files in subdirectories and referenced with relative paths. This way the entire set can be relocated without needing to edit configuration files.
Source content may be identified in topic set configuration files with wildcards in file pathnames. The asterisk "*" matches any set of characters except for the path-hierarchy separator, so that <include> ../content/text/my-topic-set/*.xml </include> will include all the XML files in the "my-topic-set" directory. Thus, best practice is to keep topic source files in directories that correspond to topic sets.
Do
Create a topic set configuration XML file for each topic set in the /topic-set XML structure shown in the example below. Set configuration entries in the order listed:
-
/topic-set/topic-set-id: A unique topic set identifier. (Required)
-
/topic-set/topic-set-type: A user defined type name that's used in the content set configuration to control the order in which topic sets appear in the output table of contents. (Required)
-
/topic-set/topic-set-link-priority: An integer that sets the priority of the topic set for soft linking. Lower values have higher priority. Default priority is 1. (Optional)
-
/topic-set/topic-types: A list of topic types to be included in output. Only those sources listed in the /topic-set/sources configuration with these types will be included. The order listed here will set the order of appearance in the topic set's table of contents. (Required)
-
/topic-set/object-types: A list of object types. (Optional)
-
/topic-set/presentation-types: A list of presentation types. A presentation type controls how each topic's structure will map into a structure needed for output formatting. (Required)
-
/topic-set/output-formats: The list of output media types to be generated for the topic set. (Required)
-
/topic-set/sources: A specification of source files for the topic set. Include source files in these categories: authored-content for authored topics, graphics for authored graphics, or sources-to-extract-content-from and authored-content-for-mergefor generated content. (Required)
-
/topic-set/condition-tokens: A list of tokens for conditional inclusion of topic fragments. (Optional)
-
/topic-set/default-topic-scope: (Optional)
-
/topic-set/default-subject-scope: (Optional)
-
/topic-set/strings: Identified strings that may be referenced in topic set contents. (Optional)
Example topic set configuration
The following shows the topic set configuration for a set in the SPFE documentation.
<spfe xmlns="http://spfeopentoolkit/ns/spfe-ot/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://spfeopentoolkit/ns/spfe-ot/config http://spfeopentoolkit.org/spfe-ot/1.0/schemas/config/spfe-config.xsd"> <topic-set> <topic-set-id>spfe-development</topic-set-id> <topic-set-type>guide</topic-set-type> <topic-types> <topic-type> <name>{http://spfeopentoolkit.org/ns/spfe-docs}think-plan-do-topic</name> <href>../../topic-types/think-plan-do-topic/config.xml</href> </topic-type> <topic-type> <name>{http://spfeopentoolkit.org/ns/spfe-docs}generic-topic</name> <href>../../topic-types/generic-topic/config.xml</href> </topic-type> <topic-type> <name>{http://spfeopentoolkit.org/ns/spfe-docs}feature-topic</name> <href>../../topic-types/feature-topic/config.xml</href> </topic-type> </topic-types> <presentation-types> <presentation-type> <name>eppo</name> </presentation-type> </presentation-types> <output-formats> <output-format> <name>html</name> </output-format> </output-formats> <sources> <authored-content> <files> <include>../../content/text/development/*.xml</include> <include>../../content/text/fragments/*.xml</include> </files> </authored-content> </sources> <default-topic-scope>spfe</default-topic-scope> <default-subject-scope>spfe</default-subject-scope> <build-rules>${SPFEOT_HOME}/1.0/build-tools/spfe-rules.xml</build-rules> <strings> <string id="eppo-simple-topic-set-title">SPFE Development</string> </strings> </topic-set> </spfe>