W3C home > Mailing lists > Public > www-forms@w3.org > August 2010

data export for subsequent transformation to csv

From: e-letter <inpost@gmail.com>
Date: Thu, 12 Aug 2010 11:28:51 +0100
Message-ID: <AANLkTikgW13z4hX7unSNuL4=hGSkQcYv-beGN=ujH10S@mail.gmail.com>
To: www-forms@w3.org
Readers,

I am trying to create a form to save data, for eventual import to a
postgresql database. The following file was created:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
xmlns:xf="http://www.w3.org/2002/xforms">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<style type="text/css" id="internalstylesheet">
			code {text-color:black; background:white; font-family:verdana, sans-serif}
		</style>
		<xf:model>
			<xf:instance>
				<xf:testform xmlns='generalinformation'>
					<xf:generalinformation/>
				</xf:testform>
			</xf:instance>
			<xf:submission
				resource='file:testgeneral.xml'
				method="put"
				id="gi"
				includenamespaceprefixes=""
			/>
		</xf:model>
		<title>
		test xml to csv for postgresql
		</title>
	</head>
	<body>
		<p>
			<xf:select1 appearance='minimal'>
				<xf:label>purpose
				</xf:label>
				<xf:item>
					<xf:label>
						England
					</xf:label>
					<xf:value>
						Building
					</xf:value>
				</xf:item>
				<xf:item>
					<xf:label>
						Scotland
					</xf:label>
					<xf:value>
						Building
					</xf:value>
				</xf:item>
				<xf:item>
					<xf:label>
						Northern Ireland
					</xf:label>
					<xf:value>
						Building
					</xf:value>
				</xf:item>
				<xf:item>
					<xf:label>
						Energy England
					</xf:label>
					<xf:value>
						joule
					</xf:value>
				</xf:item>
				<xf:item>
					<xf:label>
						Energy Wales
					</xf:label>
					<xf:value>
						joule
					</xf:value>
				</xf:item>
				<xf:item>
					<xf:label>
						Energy Scotland
					</xf:label>
					<xf:value>
						joule
					</xf:value>
				</xf:item>
				<xf:item>
					<xf:label>
						Energy Northern Ireland
					</xf:label>
					<xf:value>
						joule
					</xf:value>
				</xf:item>
			</xf:select1>
		</p>
		<p>
			<xf:select1 appearance='minimal'>
				<xf:label>Weather location
				</xf:label>
				<xf:item>
					<xf:label>
						London
					</xf:label>
					<xf:value>London
					</xf:value>
				</xf:item>
			</xf:select1>
		</p>
			<xf:submit submission='gi'>
				<xf:label>
					Send
				</xf:label>
			</xf:submit>
	</body>
	</html>

The resultant xml file is:

<?xml version="1.0" encoding="UTF-8"?>
<xf:testform xmlns:xf="http://www.w3.org/2002/xforms"
xmlns="generalinformation">
					<xf:generalinformation/>
				</xf:testform>

If I selected 'England' and 'London' in the form, I was expecting an
xml file containing these values and I expected to need to create an
xslt file for a csv file to be produced. What is my mistake to create
the xml file?

yours,

xforms@conference.jabber.org
Received on Thursday, 12 August 2010 16:21:37 GMT

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