libRocket: Select Box and DataSource issue

Hi all,
I am trying to create a drop down box with dynamic data source but i have some problems to find a good example for the implementation.
At the moment i have a normal drop down box similar to the one in the librocket StyleGuide .rcss file and the following implementation in the .rml file:

<select name="algorithm" source="algorithms.list">
    <option fields="algorithms">Algorithms:</option>
    <option value=Algorithms:>Algorithms:</option>
    <option value="option2">Option 2</option>
</select>

I found some information regarding datasources in the topic libRocket: DataGrid and DataSource issue and tried to adapt this for a select box but unfortunately this didn’t worked.

Answer:
Its possible to add the elements with a python script that is executed before loading, the python code in the rml file can access global variables of the python module where librocket is started.

def loadAlgorithms():
	element = document.GetElementById("1337")
	optionElement = document.CreateElement("option")
	optionElement.SetAttribute("value", "nothing")
	optionElement.inner_rml = "foo"
	element.AppendChild(optionElement)
	print "foo", len(element.child_nodes)

Yes indeed you can. You can use lot of tricks found in html application.

<head>
<script>
def onLoad(doc):
	titleBar=doc.GetElementById("title")
	titleBar.inner_rml="Inventory"
</script>

</head>
<body template="pywindow" onLoad="onLoad(document)">

On the onLoad event, you can choose to execute python script to fill some list, or to show/hide some elements in the page.
You can execute some local code, or you can give as parameter a html element or the html document itself to a class that will fill the element

rocketSkill.getInstance().reloadSkill(int(doc.GetElementById("idskill").value),doc)
def reloadSkill(self,id,document):
div=document.CreateElement("div")
div.SetAttribute("style","position:absolute;top:" + str(70+j*70) + "px;left:30px;width:210px;height:40px;")
div.SetAttribute("class","cadre")
...