Categories

Sometimes an API can contains a lot of functions. It become then more difficult to find the function in the specdocs. XINS 1.3.0 introduced the notion of categories. With categories you can specify functions that belong together.

Example:

Define the category names at then end of api.xml:

<api name="allinone">
...
  <category name="DataSections" />
</api>

Then create a category file with the name <category name>.cat. This file will define the function that are in the same group.

Example DataSections.cat:

<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE category PUBLIC "-//XINS//DTD Category 1.3//EN" "http://www.xins.org/dtd/category_1_3.dtd">
<category name="DataSections">
  <description>Data section related functions.</description>
  <function-ref name="DataSection" />
  <function-ref name="DataSection2" />
  <function-ref name="DataSection3" />
</category>

Now if you regenerate the specdocs, The categories will appear at the top of the API page. You can then more easily find the function you wanted.