W3C home > Mailing lists > Public > www-forms@w3.org > January 2003

AW: Not storing select values in the XForms instance

From: Roman Huditsch <roman.huditsch@hico.com>
Date: Thu, 2 Jan 2003 16:32:41 +0100
Message-ID: <0C79A363CB0321418927D0CB1AD0403C095ACC@hicoetsrv000006.hico.local>
To: Guillermo Menéndez <gmcorral@terra.es>, <www-forms@w3.org>

Hi,

thanks for the hint :) But unfortunately I couldn't make it work. My controls do not get displayed. 
I tried it with some very simple 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>
			<title>XML Topic Map-Editor v01.00 &#169;2002 by Roman Huditsch</title>
				<xforms:model schema="XTM-Schema.xsd" id="topicMapModel">
			<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="Topic ID">
						<instanceOf>
							<topicRef xlink:href="" />
						</instanceOf>
						<baseName>
							<baseNameString>Topic Name</baseNameString>
						</baseName>
						<occurrence>
							<instanceOf>
								<topicRef xlink:href="" />
							</instanceOf>
							<resourceRef xlink:href="" />
						</occurrence>
					</topic>
				</topicMap>
			</xforms:instance>
			
			<xforms:instance id="temp">
				<tempInstance>
					<language></language>
					<occurrence></occurrence>
				</tempInstance>
			</xforms:instance>
			
		</xforms:model>
		
	</head>
	<body>
		<strong>XML Topic Map-Editor</strong>
		<p>
			<xforms:select1 ref="xforms:instance('temp')/tempInstance/language">
				<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:item>
					<xforms:item>
						<xforms:label>Englisch / English</xforms:label>
						<xforms:value>en</xforms:value>
					</xforms:item>
				</xforms:choices>
			</xforms:select1>
		</p>
		</body>
</html>

I tested it with the latest X-Smiles Version (nightly built from 2. January). I also tried it with several different namespace definitions for the temp instance, but no progress either....

wbr,
Roman

-----Ursprüngliche Nachricht-----
Von: Guillermo Menéndez [mailto:gmcorral@terra.es]
Gesendet: Donnerstag, 2. Januar 2003 16:09
An: Roman Huditsch; www-forms@w3.org
Betreff: Fw: Not storing select values in the XForms instance


I forgot to point that if you use this solution you will need to add the
function "instance('....')" to all  your binding expressions, to refer to
the correct instance within the model.


----- Original Message -----
From: "Guillermo Menéndez" <gmcorral@terra.es>
To: "Roman Huditsch" <roman.huditsch@hico.com>; <www-forms@w3.org>
Sent: Thursday, January 02, 2003 4:00 PM
Subject: Re: Not storing select values in the XForms instance



Hello,

I think a possible solution for your problem could be adding a new instance
within your XForm model, for example (using German as default language):

<xforms:instance id="temp">
    <tempInstance>
        <language>de</language >
    </tempInstance>
</xforms:instance>

The select1 control could be like this :

<xforms:select1 appearance="compact" ref="instance('temp')/language">
.....

Multiple instances per model are supported on Novell xForms T.P. and on
X-Smiles 0.71.

regards,
Guillermo Menéndez
Received on Thursday, 2 January 2003 10:34:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:54 GMT