Handling xs:enumeration in Tamino Schema

Hello Everyone.

Has anyone developed any special tags for handling Tamino Schema information in their X-Applications?

Someone asked how to get the values from an xs:enumeration (defined in the Tamino Schema) into a select list.
We proposed a solution using xapp:select and a query on ino:collection (see below), but this feels like the sort of thing that people might be doing all the time with a custom tag…

Here is the solution that we proposed (thanks to Christian and Thorsten!):

<xapp:setvar name="schemaInfo" scope="session">
     for $x in input()/xs:schema[.//tsd:collection/@name='xapp' and 
     return $x/xs:enumeration/@value
<xapp:select collection="ino:collection" text="${schemaInfo$}">
     <select name="varSelection">
          <option value=""></option>


X-Application Version: 4.1.1
Tamino Version : 4.1.1
Platform : Win2k
WebContainer : Tomcat 4.1.18
JDK Version : 1.4.1