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:

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>