[ghns] DXS - Get available categories

Michael Gebhart lists at miketech.net
Tue Jul 26 20:17:01 EST 2005


Hi,

the first function we need in DXS is to get all available categories on
a DXS based webservice. 

My suggestion is this:


function-name:

get_categories()


parameters:

no parameters


return value:

The function returns an array with the categories. Each element of the
array contains a complexType like this:

<complexType name="Category">
<all>
<element name="id" type="xsd:int"/>
<element name="parent" type="xsd:int"/>
<element name="name" type="xsd:string"/>
<element name="description" type="xsd:string"/>
<element name="content" type="xsd:string"/>
</all>
</complexType>


id: A unique ID for each category. 
parent: The ID of a parent category. This allows sub-categories. (0 = no
parent)
name: This is the name of the category, which can be displayed (e.g.:
Themes)
description: A descirption of the category, long version of "name".
content: Here we have to set the content in this category. Maybe we
should have something like this: "wallpaper"


Here is an example, how to use it:

First category:

id = 1
parent = 0
name = "Themes"
description = "This category contains themes for all desktop
environments"
content: themes


Second category:

id = 2
parent = 1
name = "KDE"
description = "This category contains Themes for the KDE"
content: themes/kde


third category:

id = 3
parent = 1
name = "GTK"
description = "This category contains themes for the GTK"
content: themes/gtk



Now it becomes displayed:

Themes
 - KDE
 - GTK



What do you think about this? The content should be the same in GHNS and
DXS. So we should have a list of all content-types.


Greetings

Mike



More information about the ghns mailing list