[ghns] DXS - Get available categories
Michael Gebhart
lists at miketech.net
Sat Jul 30 16:08:30 EST 2005
Hi,
still have another suggestion:
<complexType name="Category">
<all>
<element name="id" type="xsd:string"/>
<element name="name" type="xsd:string"/>
<element name="description" type="xsd:string"/>
<element name="content" type="xsd:string"/>
</all>
</complexType>
We could also have IDs like this:
//themes
//themes/KDE
//themes/GTK
//wallpaper
//wallpaper/Other
//wallpaper/Nature
Designed similar to the content, but content contains for all wallpapers
"/wallpaper" no /wallpaper/Other, because these are the categories.
And with this you don´t need to set a parent, because you know,
that //wallpaper/Other is a child of //wallpaper.
The disadvantage: You can´t set a child to more than one parent. Each
child has exactly one parent. But I think this is not a really
disadvantage.
What do you think about this?
Greetings
Mike
> 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
>
> _______________________________________________
> ghns mailing list
> ghns at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/ghns
>
More information about the ghns
mailing list