SPFE Documentation | Collections > SPFE Development > Configuring content sets
Configuring content sets
Think
The SPFE Open Toolkit (SPFE-OT) must be configured to control how it builds output from source XML markup. The content set configuration is an XML structure that specifies which content will be included in a SPFE-OT build.
The content set configuration file will be the entry point for the build process; it will be specified as the first argument of the spfe command that starts the build process. The content set configuration file references topic set configuration files that specify individual topics. The SPFE build system processes each topic set as a unit.
The SPFE build system will, by default, organize topics hierarchically with topic sets in separate groups and topics organized by topic type within a topic set. The build system will generate table of contents (TOC) with this organization to aid navigation. These TOCs are not the only navigation aids the build system generates; the system also creates subject-affinity links (soft links) and subject index lists. Nevertheless, hierarchical navigation is one way that content users will find what they want.
Plan
- Where should the configuration files reside?
-
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.
Do
Create a content set configuration XML file in the directory you will execute the spfe command to create builds or any convenient location. Use the /content-set XML structure shown in the example that follows.
Required settings
Set the following in the content set configuration in the order listed:
-
/content-set/content-set-id: A unique content set identifier, which will be the name of the sub-directory under the SPFE_BUILD_DIR directory where the content set will be generated.
-
/content-set/title: The title that will appear on the generated home page for the content set.
-
/content-set/home-topic-set: Set the topic that will be the home or first page in the content set's output. The home topic set must be among the listed topic sets.
-
/content-set/topic-sets: List the topic sets to be included in the content set.
-
/content-set/subject-types: Specify the subject-affinitytags that the build system may recognize in forming subject-affinity lists. Topics may include an index of terms, each of which is associated with a subject type defined in the content set configuration, so that they may become the target of soft linking.
Optional settings
Set optional items in the content set configuration in the order listed. An option that is not used does not need to be set; just leave it out:
-
/content-set/condition-tokens: Specify tokens for conditional inclusion of content fragments in output.
-
/content-set/messages: Specify the type of messages (info and warning) to include in the build log.
-
/content-set/output-formats: Specify output formats.
-
/content-set/strings: Identify strings that may be included in content when referenced.
Content set example configuration
The following shows the content set configuration for 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"> <content-set> <content-set-id>spfe-docs</content-set-id> <title>SPFE Documentation</title> <home-topic-set>spfe-docs-home</home-topic-set> <topic-sets> <topic-set> <topic-set-id>spfe-development</topic-set-id> <href>topic-sets/spfe-development.xml</href> </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> </topic-set> <topic-set> <topic-set-id>eppo-presentation-reference</topic-set-id> <href>topic-sets/eppo-presentation-reference.xml</href> </topic-set> <topic-set> <topic-set-id>eppo-graphic-record-doctype-reference</topic-set-id> <href>topic-sets/eppo-graphic-record-reference.xml</href> </topic-set> <topic-set> <topic-set-id>eppo-generic-topic-reference</topic-set-id> <href>topic-sets/eppo-generic-topic-reference.xml</href> </topic-set> <topic-set> <topic-set-id>spfe-function-reference</topic-set-id> <href>topic-sets/spfe-function-reference.xml</href> </topic-set> <topic-set> <topic-set-id>spfe-docs-essays</topic-set-id> <href>topic-sets/spfe-docs-essays.xml</href> </topic-set> <topic-set> <topic-set-id>spfe-docs-lists</topic-set-id> <href>topic-sets/spfe-docs-lists.xml</href> </topic-set> </topic-sets> <subject-types> <subject-type> <id>config-setting</id> <aliases> <singular>Configuration setting</singular> <plural>Configuration settings</plural> </aliases> </subject-type> <subject-type> <id>spfe-build-property</id> <aliases> <singular>Build property</singular> <plural>Build properties</plural> </aliases> </subject-type> <subject-type> <id>feature</id> <aliases> <singular>Feature</singular> <plural>Features</plural> </aliases> </subject-type> <subject-type> <id>xslt-function-reference-entry</id> <aliases> <singular>SPFE function</singular> <plural>SPFE functions</plural> </aliases> </subject-type> <subject-type> <id>xslt-function-name</id> <aliases> <singular>XSLT function</singular> <plural>XSLT functions</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>html</name> <href>../../spfe-ot/plugins/eppo-simple/output-types/html/config.xml</href> </output-format> </output-formats> <strings> <string id="product">SPFE Open Toolkit</string> <string id="product-release">1.0 (alpha 1)</string> <string id="copyright">Copyright © 2014 Analecta Communications Inc.</string> </strings> </content-set> </spfe>