Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleOur Solution to the Problem

We have defined a simple model for add-ons, spaces, and doctypes that can be specified with XML files. We provide XML schema files to support template authors in writing those models.

Based on the information of these models the Doctype Maven Plugin (a plugin to be run with Maven) generates an OBR or JAR with the blueprint add-on to be run on a Confluence server.

Let's have a look at an exmple .doctype model!

Code Block
languagexml
titleSlightly modified Cheat Doctype
<doctype
  xmlns="http://smartics.de/xsd/projectdoc/doctype/1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  id="cheat"
  base-template="standard"
  provide-type="standard-type"
  category="default">
  <resource-bundle>
    <l10n>
      <name>Cheat</name>
      <description>
        A brief solution to a problem.
      </description>
      <about>
        Cheats are brief solutions to a problem. They are short, to the point,
        and can be easily shared with your team.
      </about>
    </l10n>
  </resource-bundle>

  <properties>
    <property key="projectdoc.doctype.common.type">
      <value>
        <macro name="projectdoc-name-list">
          <param name="doctype">cheat-type</param>
          <param
            name="property"
            key="projectdoc.doctype.common.type" />
          <param name="render-no-hits-as-blank">true</param>
        </macro>
      </value>
    </property>
    <property key="projectdoc.doctype.cheat.level-of-experience-required">
      <value>
        <macro name="projectdoc-name-list">
          <param name="doctype">experience-level</param>
          <param name="property" key="projectdoc.doctype.cheat.level-of-experience-required" />
          <param name="render-no-hits-as-blank">true</param>
        </macro>
      </value>
      <resource-bundle>
        <l10n>
          <name>Level of Experience</name>
          <description>
            The level of experience expected the cheat addresses.
          </description>
        </l10n>
      </resource-bundle>
    </property>
  </properties>

  <sections>
    <section key="projectdoc.doctype.common.description">
      <resource-bundle>
        <l10n>
          <description>
            Provide an optional overview over the context the cheat is applied
            in.
          </description>
        </l10n>
      </resource-bundle>
    </section>

    <section key="projectdoc.doctype.common.summary">
      <resource-bundle>
        <l10n>
          <name>Summary</name>
          <description>
            Provide a solution to the problem.
          </description>
        </l10n>
      </resource-bundle>
    </section>
    <section key="projectdoc.doctype.cheat.examples">
      <resource-bundle>
        <l10n>
          <name>Examples</name>
          <description>
            Provide some examples on how the cheat looks like when applied.
          </description>
        </l10n>
      </resource-bundle>
    </section>
  </sections>

  <related-doctypes>
    <doctype-ref id="asset" />
    <doctype-ref id="todo" />
    <doctype-ref id="event" />
  </related-doctypes>
</doctype>

In this example you see a very slightly simplifed version of the Cheat doctype (see the current version of the doctype on Bitbucket). It defines two properties and gets a lot of standard properties inherited due to the reference to the standard base template. It also defines two sections and again, inherits a number of standard sections from the standard base template.

Due to the value of the provide-type attribute, another doctype, called Cheat Type, will be created. This will allow authors to categorize cheats with a doctype-specific type.

The doctype is associated with a default category. Doctype categories are used for grouping doctypes and render lists of references in a space homepage. Related doctypes – as you can see on the bottom of the XML document – are links rendered on homepages and index pages. Both structures support navigation and help readers to find information by browsing.

...

Section
titleResources


Tour
render-no-hits-as-blanktrue
render-as-definition-listtrue
replace-title-with-nametrue





Piwik Set Multiple Custom Variables


NameValue
Departmentprojectdoc
Categoryprojectdoc-tip
Typehowto


...