switching between cases in X-Smiles

Hello,

I once again need your help, please. I don't know if my problem is primarily due to an X-Smiles bug or to some error in my code. 
I have several trigger elements in my XForms document. 
In the upper right corner there is a select1 with switches between two languages.
In each language case there are two buttons (topic, association) which should also trigger a switch event.
If I select the first option in my language selection, the other switching (with buttons) doesn't work. 
But if I select the second language option, the button-switch works. 
The code is identic (expect for the text values within the label and hint elements).
I also tried to change the order of the button-cases in my source code and discovered that the problem always occurs at the first case element in my source code.  

Here is my complete source code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xforms="http://www.w3.org/2002/xforms/cr" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:tm="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink">
	<head>
		<link rel="stylesheet" type="text/css" href="xtm-editor.css" />
		<title>XML Topic Map-Editor v01.00 &#169;2002 by Roman Huditsch</title>
		<meta name="author" content="Roman Huditsch" />
		<meta name="date" content="2002-11-26" />
		<meta name="description" content="Dieser XML Topic Map-Editor wurde von Roman Huditsch im Zuge der Diplomarbeit erstellt. Mit Hilfe dieses Editors ist es möglich, Topic Maps zu erstellen, die der XTM-Syntax entsprechen " />
		<xforms:model schema="XTM-Schema.xsd">
			<xforms:submission id="submit1" method="post" action="http://127.0.0.1:8080/tm.jsp" version="1.0" omit-xml-declaration="yes" />
			<!--xforms:submission id="submit1" localfile="temp2.xml" method="postxml" target2="http://www.hut.fi/" /-->
			<xforms:instance id="xtm">
				<topicMap xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink">
					<topic id="">
						<instanceOf>
							<topicRef xlink:href="" />
						</instanceOf>
						<baseName>
							<baseNameString />
						</baseName>
						<occurrence>
							<instanceOf>
								<topicRef xlink:href="" />
							</instanceOf>
							<resourceRef xlink:href="" />
						</occurrence>
						<occurrence>
							<instanceOf>
								<topicRef xlink:href="#" />
							</instanceOf>
							<resourceData />
						</occurrence>
					</topic>
				</topicMap>
			</xforms:instance>
			<xforms:bind nodeset="//@xlink:href" calculate="xforms:if(starts-with(.,'#'),.,concat('#',.))" />
		</xforms:model>
	</head>
	<body>
		<strong>XML Topic Map-Editor</strong>
		<p class="selectlanguage">
			<xforms:select1 appearance="full">
				<xforms:hint>Wählen Sie hier die Sprache der Formularfeldbeschriftungen / Select the language for the form labels</xforms:hint>
				<xforms:label>Sprache / Language</xforms:label>
				<xforms:choices>
					<xforms:item>
						<xforms:label>Deutsch / German</xforms:label>
						<xforms:value>de</xforms:value>
						<xforms:toggle case="de" ev:event="xforms-select" />
					</xforms:item>
					<xforms:item>
						<xforms:label>Englisch / English</xforms:label>
						<xforms:value>en</xforms:value>
						<xforms:toggle case="en" ev:event="xforms-select" />
					</xforms:item>
				</xforms:choices>
			</xforms:select1>
		</p>
		<xforms:switch>
			<xforms:case id="de">
				<table class="switch">					
					<tr>
						<td class="switchButtons">
							<p class="switchButtons">
								<xforms:trigger id="switchTopic">
									<xforms:label>Topics</xforms:label>
									<xforms:hint>Klicken Sie hier, um Topics zu verwalten</xforms:hint>
									<xforms:toggle case="topic" ev:event="click" />
								</xforms:trigger>
								<xforms:trigger id="switchAssociations">
									<xforms:label>Associations</xforms:label>
									<xforms:hint>Klicken Sie hier, um Associations zu verwalten</xforms:hint>
									<xforms:toggle case="association" ev:event="click" />
								</xforms:trigger>
							</p>
						</td>
					</tr>	
					<tr>
						<xforms:switch>
							<xforms:case id="topic">
								<td>

									<xforms:repeat nodeset="/tm:topicMap/tm:topic" id="topicRepeat">
										<p/>
										<p>
										<xforms:input ref="@id" class="topicId">
											<xforms:label class="test">Topic ID: </xforms:label>
											<xforms:hint>Eindeutiger Wert zur Identifikation des Topics</xforms:hint>
										</xforms:input>
										</p>
										<p>
										<xforms:input ref="tm:baseName/tm:baseNameString" class="topicName">
											<xforms:label>Name des Topics: </xforms:label>
											<xforms:hint>Geben Sie hier bitte einen Namen für das Topic ein</xforms:hint>
										</xforms:input>
										</p>

									</xforms:repeat>
									<p/>
									<p>
									<xforms:trigger id="topicInsertButton">
										<xforms:label>Topic hinzufügen</xforms:label>
										<xforms:action ev:event="click">
											<xforms:insert nodeset="tm:topicMap/tm:topic" at="xforms:index('topicRepeat')" position="after" />
											<xforms:setvalue ref="/tm:topicMap/tm:topic[position()=last()]/@id" />
											<xforms:setvalue ref="/tm:topicMap/tm:topic[position()=last()]/tm:baseName/tm:baseNameString" />
										</xforms:action>
									</xforms:trigger>
									<xforms:trigger id="topicDeleteButton">
										<xforms:label>Topic löschen</xforms:label>
										<xforms:action ev:event="click">
											<xforms:delete nodeset="tm:topicMap/tm:topic" at="xforms:index('topicRepeat')" />
										</xforms:action>
									</xforms:trigger>
									</p>
								</td>
							</xforms:case>

							<xforms:case id="association" >
								<td>
									Hallo
								</td>
							</xforms:case>
						</xforms:switch>
					</tr>
				</table>
				<p class="buttons">
					<xforms:submit submission="submit1">
						<xforms:hint>Klicken Sie hier, um ihre Topic Map zu speichern</xforms:hint>
						<xforms:label>Speichern</xforms:label>
					</xforms:submit>
					<xforms:trigger class="reset">
						<xforms:hint>Klicken Sie hier, um ihre Eingaben zu verwerfen</xforms:hint>
						<xforms:label>Verwerfen</xforms:label>
						<xforms:action ev:event="click">
							<xforms:reset model="form1" />
						</xforms:action>
					</xforms:trigger>
				</p>
			</xforms:case>
			<xforms:case id="en">
				<table class="switch">
					<tr>
						<td class="switchButtons">
							<p class="switchButtons">
								<xforms:trigger id="switchTopic">
									<xforms:label>Topics</xforms:label>
									<xforms:hint>Click here to manage your topics</xforms:hint>
									<xforms:toggle case="topic" ev:event="click" />
								</xforms:trigger>
								<xforms:trigger id="switchAssociations">
									<xforms:label>Associations</xforms:label>
									<xforms:hint>Click here to manage your associations</xforms:hint>
									<xforms:toggle case="association" ev:event="click" />
								</xforms:trigger>
							</p>
						</td>
					</tr>
					<tr>
						<xforms:switch>
							<xforms:case id="topic">
								<td>

									<xforms:repeat nodeset="/tm:topicMap/tm:topic" id="topicRepeat">
										<p/>
										<p>
										<xforms:input ref="@id" class="topicId">
											<xforms:label class="test">Topic ID: </xforms:label>
											<xforms:hint>Unique value for identifying your topic</xforms:hint>
										</xforms:input>
										</p>
										<p>
										<xforms:input ref="tm:baseName/tm:baseNameString" class="topicName">
											<xforms:label>Name of Topic: </xforms:label>
											<xforms:hint>Please enter any value for naming your topic</xforms:hint>
										</xforms:input>
										</p>

									</xforms:repeat>
									<p/>
									<p>
									<xforms:trigger id="topicInsertButton">
										<xforms:label>create Topic</xforms:label>
										<xforms:action ev:event="click">
											<xforms:insert nodeset="tm:topicMap/tm:topic" at="xforms:index('topicRepeat')" position="after" />
											<xforms:setvalue ref="/tm:topicMap/tm:topic[position()=last()]/@id" />
											<xforms:setvalue ref="/tm:topicMap/tm:topic[position()=last()]/tm:baseName/tm:baseNameString" />
										</xforms:action>
									</xforms:trigger>
									<xforms:trigger id="topicDeleteButton">
										<xforms:label>delete Topic</xforms:label>
										<xforms:action ev:event="click">
											<xforms:delete nodeset="tm:topicMap/tm:topic" at="xforms:index('topicRepeat')" />
										</xforms:action>
									</xforms:trigger>
									</p>
								</td>
							</xforms:case>

							<xforms:case id="association" >
								<td/>
							</xforms:case>
						</xforms:switch>
					</tr>
				</table>
				
				<p class="buttons">
					<xforms:submit submission="submit1">
						<xforms:hint>Click here for saving your Topic Map</xforms:hint>
						<xforms:label>Save</xforms:label>
					</xforms:submit>
					<xforms:trigger>
						<xforms:hint>Click here to dismiss your inputs</xforms:hint>
						<xforms:label>Dismiss</xforms:label>
						<xforms:action ev:event="click">
							<xforms:reset model="form1" />
						</xforms:action>
					</xforms:trigger>
				</p>
			</xforms:case>
			
		</xforms:switch>
	</body>
</html>


My CSS:


body 	
	{
	font-family: Arial, Sans-serif;
	font-size: 10pt;
	}

strong 
	{
	font-weight:bold;
	}
	
table.switch
	{
	width:700px;
	
	
	}
	
p.switchButtons
	{
	margin-left:-3px;
	}
	
td.switchButtons
	{
	height:29px;
	}

p.buttons	
	{
	text-align:center;
	}
	
	
.selectlanguage 
	{
	position:absolute;
	
	text-align:right;
	
	}
	
	
input.topicId 
	{
	
	width:120px;
	
	}
	
	
input.topicName 
	{
	
	width:120px;
	}
	


Please help me.

wbr,
Roman


-----Ursprüngliche Nachricht-----
Von: Alex Rosen [mailto:arosen@novell.com]
Gesendet: Mittwoch, 13. November 2002 20:48
An: www-forms@w3.org
Betreff: CR Section 8.3 errors



Sections 8.3.4 and 8.3.5 talk about xforms:help and xforms:hint events, these should be xforms-help and xforms-hint. They also both talk about the "type" attribute on <message>, this should be "level".

Since "hint" corresponds to "ephemeral" and "help" corresponds to "modeless", it seems logical to conclude that "alert" corresponds to "modal". If this isn't true, it would be helpful to explicitly state this fact in section 8.3.6, to keep from leading people down the garden path.

Also, in the same section, "at in instance data" has one too many words.

Alex Rosen
Novell, Inc.

Received on Tuesday, 10 December 2002 11:45:44 UTC