SPFE Documentation | Collections > SPFE Development > Adding a new content set

Adding a new content set

Think

A content set is a collection of one or more related topic sets. A content set generally contains all the content related to a single product, service, or site.

A content set is defined by a content set configuration file which points to a set of topic set configuration files that define the content the topic sets that make up the content set. Topic source files are not inherently tied to any one topic set or content set. Topics are included in a topic set by a query or rule in the topic set configuration file. It is possible to include the same topic in many different topic set configurations, and to include the same topic set configuration in more than one content set. Therefore, you can define as many content sets as you like, simply by writing new content set configuration files. This makes it easy to reuse topics in different content sets. It also makes it easy to set up different build configurations for use during the development process.

Plan

Do I need a content set?

Yes. The SPFE build requires a content set as a build target.

Do I need more than one topic set in my content set?

No, you use a single topic set to include all your topics. Reasons to use multiple topic sets include clustering or categorization of content in the top-down navigation and creating different build scenarios for different topic types.

How do I create a TOC for my content set?

The TOC for the content set is actually the TOC of the topic set that is designated the home topic set (/content-set/home-topic-set). The script used to create the TOC is specified in the topic set configuration of the home topic set. You select the appropriate script as part of the topic set configuration.

Do I always have to build the entire content set?

If your content set is large, it may take a long time to build. If you are working on a single topic set and you want to do frequent builds of that topic set, you may not want to have to build the entire content set each time. SPFE does not provide a way to build topic sets individually. However, because a content set is to inexpensive to set up, you can create a content set that contains just the topic set you are working on and build that.

Do

To add a content set, create a content set configuration file with the root element /content-set. You need the following mandatory attributes and elements:

The following is an abbreviated version of the content set configuration for the SPFE content set:

                <?xml version="1.0" encoding="UTF-8"?>
<!-- This file is part of the SPFE Open Toolkit. See the accompanying license.txt file for applicable licenses.-->
<!-- (c) Copyright Analecta Communications Inc. 2012 All Rights Reserved. -->

<content-set xmlns="http://spfeopentoolkit.org/ns/spfe-ot/config"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://spfeopentoolkit.org/ns/spfe-ot/config http://spfeopentoolkit.org/spfe-ot/1.0/schemas/config/spfe-config.xsd">
    <content-set-id>spfe-docs</content-set-id>
    <title>SPFE Documentation</title>
    <home-topic-set>spfe-docs-home</home-topic-set>

    <topic-set-groups>
        <group>
            <name>SPFE</name>
            <group><name>Guides</name></group>
            <group><name>References</name></group>
            <group><name>Lists</name></group>
        </group>
        <group>
            <name>EPPO Simple</name>
            <group><name>Guides</name></group>
            <group><name>References</name></group>
        </group>
    </topic-set-groups>
    <topic-sets>
        <topic-set>
            <topic-set-id>spfe-development</topic-set-id>
            <href>topic-sets/spfe-development.xml</href>
            <group>SPFE; Guides</group>
        </topic-set>    
        
        <topic-set>
            <topic-set-id>spfe-docs-home</topic-set-id>
            <href>topic-sets/spfe-docs-home.xml</href>
        </topic-set>
        
        <topic-set>
            <topic-set-id>spfe-configuration-reference</topic-set-id>
            <href>topic-sets/spfe-configuration-reference.xml</href>
            <group>SPFE; References</group>
        </topic-set>  
		
		 <topic-set>
            <topic-set-id>eppo-presentation-reference</topic-set-id>
            <href>topic-sets/eppo-presentation-reference.xml</href>
		     <group>EPPO Simple; References</group>
        </topic-set>  
        
		 <topic-set>
            <topic-set-id>eppo-simple-writing</topic-set-id>
            <href>topic-sets/eppo-simple-writing.xml</href>
		     <group>EPPO Simple; Guides</group>
        </topic-set>  
           
        <topic-set>
            <topic-set-id>spfe-function-reference</topic-set-id>
            <href>topic-sets/spfe-function-reference.xml</href>
            <group>SPFE; References</group>
        </topic-set>
        
        <topic-set>
            <topic-set-id>spfe-docs-essays</topic-set-id>
            <href>topic-sets/spfe-docs-essays.xml</href>
            <group>SPFE; Guides</group>
        </topic-set>
        
        <topic-set>
            <topic-set-id>spfe-demos</topic-set-id>
            <href>topic-sets/spfe-demos.xml</href>
            <group>EPPO Simple; Guides</group>
        </topic-set>
        
        <topic-set>
            <topic-set-id>spfe-docs-lists</topic-set-id>
            <href>topic-sets/spfe-docs-lists.xml</href>
            <group>SPFE; Lists</group>
        </topic-set>
    </topic-sets>
    
    <object-sets>
        <object-set>
            <object-set-id>spfe-docs-misc-tables</object-set-id>
            <href>object-sets/spfe-docs-misc-tables.xml</href>                 
        </object-set>
        <object-set>
            <object-set-id>spfe-docs-if-then-tables</object-set-id>
            <href>object-sets/spfe-docs-if-then-tables.xml</href>                 
        </object-set>
    </object-sets>
    
    <subject-types>
        <subject-type>
            <id>config-setting</id>
            <aliases>
                <singular>Configuration setting</singular>
                <plural>Configuration settings</plural>
            </aliases>
        </subject-type>
        <subject-type>
            <id>feature</id>
            <aliases>
                <singular>Feature</singular>
                <plural>Features</plural>
            </aliases> 
        </subject-type>
        <subject-type>
            <id>xslt-library-reference-entry</id>
            <aliases>
                <singular>SPFE function</singular>
                <plural>SPFE functions</plural>
            </aliases>
        </subject-type>
        <subject-type>
            <id>spfe-xslt-function</id>
            <aliases>
                <singular>XSLT function</singular>
                <plural>XSLT functions</plural>
            </aliases>
        </subject-type>
        <subject-type>
            <id>xslt-template-name</id>
            <aliases>
                <singular>XSLT template</singular>
                <plural>XSLT templates</plural>
            </aliases>
        </subject-type>
        
        <subject-type>
            <id>task</id>
            <aliases>
                <singular>Task</singular>
                <plural>Tasks</plural>
            </aliases>
        </subject-type>
        <subject-type>
            <id>file-name</id>
            <aliases>
                <singular>File name</singular>
                <plural>File names</plural>
            </aliases>
        </subject-type>
        <subject-type>
            <id>document-name</id>
            <aliases>
                <singular>Document name</singular>
                <plural>Document names</plural>
            </aliases>
        </subject-type>
        <subject-type>
            <id>xml-element-name</id>
            <aliases>
                <singular>XML element name</singular>
                <plural>XML element names</plural>
            </aliases>
        </subject-type>
    </subject-types>

    <messages>warning info</messages>
 
    <output-formats>
        <output-format>
            <name>xhtml</name>
            <href>../../spfe-ot/plugins/eppo-simple/output-types/xhtml/config.xml</href>
        </output-format>
    </output-formats>              

    <strings>
        <string id="product">SPFE Open Toolkit</string>
        <string id="product-release">1.0</string>
        <string id="copyright">Copyright © 2015 Analecta Communications Inc.</string>
    </strings>
 </content-set>

            

This content set includes three topic sets, each with their own configuration file, which is specified by the /content-set/topic-sets/topic-set/href setting. The path is relative to the location of the configuration file that defines the /content-set element.

To add an index page for the content set, you need to add a topic set that includes an index topic and includes the topic set in the list of topic sets. For example, the topic set spfe-docs-home contains the index topic for the SPFE content set.

Run the spfe build tool and specify the configuration file that contains the /content-set element as the first parameter. If you see the topic sets that your content set includes in the table of contents you have successfully added a content set.