IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only

Handling xs:enumeration in Tamino Schema

  • 1.  Handling xs:enumeration in Tamino Schema

    Posted Mon March 24, 2003 07:21 PM

    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 
    .//tsd:doctype/@name='test']/xs:element/xs:simpleType/xs:restriction
    return $x/xs:enumeration/@value
    </xapp:setvar>
    <xapp:select collection="ino:collection" text="${schemaInfo$}">
    <select name="varSelection">
    <option value=""></option>
    </select>
    </xapp:select>


    Greetings,
    Trevor.

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


    #webMethods
    #API-Management
    #Tamino