[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Restructure in DISL
Hi all, for our application (music player control in DISL) we needed the restructure element for obtaining the playlist dynamically and providing an interface for it. I attached the DISL code and following is the fragment of the DTD, how we used restructure, which is a bit different from standard UIML as we allowed adressing templates by name and we did not implement cascade: <!ELEMENT restructure EMPTY> <!-- where-start,where-stop,template-start,template-stop KEYWORDS: TOP,BOTTOM --> <!ATTLIST restructure how (union | replace | delete) "union" where (before | here | after | child) "after" where-start NMTOKEN #IMPLIED where-stop NMTOKEN #IMPLIED where-template (before | here | after | child) "after" template-start NMTOKEN #IMPLIED template-stop NMTOKEN #IMPLIED template NMTOKEN #IMPLIED > BR, Robbie. -- _/ Dipl. Inf. Robbie Schaefer _/ Phone: +49 5251 60-6107 _/ _/ Visual Interactive Systems _/ Fax: +49 5251 60-6065 _/ _/ C-LAB Fuerstenallee 11 _/ _/ _/ D-33102 Paderborn _/ URL: http://www.c-lab.de _/ ----- Original Message ----- From: "James Helms" <jhelms@harmonia.com> To: "OASIS UIML TC" <uiml@lists.oasis-open.org>; "Marc Abrams" <mabrams@harmonia.com>; "Jean Vanderdonckt" <vanderdonckt@isys.ucl.ac.be> Cc: <limbourg@acm.org>; <kris.luyten@uhasselt.be> Sent: Monday, September 26, 2005 5:23 PM Subject: [uiml] Examples of restructure. Hello all, Here are some simple examples of the <restructure> tag that we will be discussing at the next meeting. Thanks! James Helms Director of Research and Development Harmonia, Inc. P.O. Box 11282 Blacksburg, VA 24062 Office: (540) 951-5900 x 3 Cell: (540) 558-9722 ---------------------------------------------------------------------------- ---- > --------------------------------------------------------------------- > To unsubscribe from this mail list, you must leave the OASIS TC that > generates this mail. You may a link to this group and all your TCs in OASIS > at: > https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE uidl SYSTEM "disl.dtd"> <disl> <interface id="SongControl" state="start"> <structure> <widget id="TitleScreen" generic-widget="variablefield"/> <widget id="ActSong" generic-widget="variablefield"/> <widget id="SetSong" generic-widget="variablebox"/> <widget id="Back" generic-widget="command"/> <widget id="Reload" generic-widget="command"/> </structure> <style> <part generic-widget="TitleScreen"> <property id="type">string</property> <property id="value">Device Playlist</property> <property id="title">Title</property> <property id="description">Play List</property> <property id="help">Shows device playlist</property> <property id="visible">yes</property> </part> <part generic-widget="ActSong"> <property id="type">string</property> <property id="value">Song 1</property> <property id="title">Now Playing</property> <property id="description">none</property> <property id="help">none</property> <property id="visible">yes</property> </part> <part generic-widget="SetSong"> <property id="type">integer</property> <property id="value">1</property> <property id="title">Enter Song Number:</property> <property id="description">none</property> <property id="help">none</property> <property id="visible">yes</property> <property id="activated">yes</property> <property id="modified">no</property> </part> <part generic-widget="Reload"> <property id="title">Reload List</property> <property id="description">Sync with device</property> <property id="help">Sync with device</property> <property id="selected">no</property> <property id="visible">yes</property> <property id="activated">yes</property> </part> <part generic-widget="Back"> <property id="title">Back</property> <property id="description">Back to upper interface</property> <property id="help">none</property> <property id="selected">no</property> <property id="visible">yes</property> <property id="activated">yes</property> </part> </style> <behavior> <variable id="finalsong" constant="yes" type="string">Song </variable> <variable id="SongChanged" internal="no" type="boolean">false</variable> <variable id="actSong" internal="no" type="integer">1</variable> <!-- Rules based on commands --> <rule id="Reload"> <condition> <equal> <property generic-widget="Reload" id="selected">yes</property> </equal> </condition> </rule> <rule id="Back"> <condition> <equal> <property generic-widget="Back" id="selected">yes</property> </equal> </condition> </rule> <rule id="NewSongSet"> <condition> <equal> <property generic-widget="SetSong" id="modified">yes</property> </equal> </condition> </rule> <!-- Rules based on internal variables--> <rule id="SongChanged"> <condition> <equal> <variable id="SongChanged">true</variable> </equal> </condition> </rule> <!-- Interface transitions based on rule states --> <transition> <if-true rule-id="Back"/> <action> <interface id="START"/> </action> </transition> <transition> <if-true rule-id="NewSongSet"/> <action> <if> <condition> <equal negation="yes"> <variable id="actSong"/> <property id="value" generic-widget="SetSong"/> </equal> </condition> <action> <statement> <variable id="actSong"/> <property id="value" generic-widget="SetSong"/> </statement> <statement> <variable id="SongChanged">true</variable> </statement> </action> </if> </action> </transition> <transition> <if-true rule-id="SongChanged"/> <action> <call id="changetitle" synchronized="no" source="http://uidlhost.dyndns.org/Audioplayer/servlet" timeout="8s" maxsize="0"> <parameter id="request"> <value-of>setplaypos</value-of> </parameter> <parameter id="argument"> <variable id="actSong"/> </parameter> </call> <statement> <variable id="SongChanged">false</variable> </statement> <statement> <property id="value" generic-widget="ActSong"/> <variable id="finalsong"/> </statement> <statement assignment="add"> <property id="value" generic-widget="ActSong"/> <variable id="actSong"/> </statement> </action> </transition> <transition> <if-true rule-id="Reload"/> <action> <call id="ReloadList" source="http://uidlhost.dyndns.org/Audioplayer/servlet?request=getuidlplaylist" template="PlayList"/> <restructure how="delete" where="after" where-start="Reload" where-stop="BOTTOM"/> <restructure how="union" where="after" where-start="Reload" template-start="ROOT" template-stop="BOTTOM" template="PlayList"/> </action> </transition> <event id="checkplaying" activated="yes" repeat="yes" timer="20s"> <action> <call source="http://uidlhost.dyndns.org/Audioplayer/servlet" id="getsong" synchronized="yes" timeout="5s" maxsize="2"> <parameter id="request"> <value-of>getplaypos</value-of> </parameter> </call> <if> <condition> <equal negation="yes"> <variable id="actSong"/> <call id="getsong"/> </equal> </condition> <action> <statement> <variable id="actSong"/> <call id="getsong"/> </statement> <statement> <property id="value" generic-widget="ActSong"/> <variable id="finalsong"/> </statement> <statement assignment="add"> <property id="value" generic-widget="ActSong"/> <variable id="actSong"/> </statement> </action> </if> </action> </event> </behavior> </interface> <template id="PlayList"/> </disl>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]