cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Paul Adams <co...@colina.demon.co.uk>
Subject CForms Binding to XML file sample
Date Fri, 02 Jul 2004 09:31:55 GMT
It seems to me there is something seriously wrong with the binding to
xml file sample.

If I add a new row to the table at the bottom, I get the following XML
output:

<data>
-
	<wrapper>
-
	<context>
-
	<info>
<email boolBindingWorks="false">yourname@yourdomain.com</email>
<number value="3"/>
<choose value="true"/>
-
	<phone cntr="32">
<zone>2</zone>
<number>2222222</number>
</phone>
</info>
<ipaddress changed="false">10.34.44.78</ipaddress>
<birthday>1960-04-10</birthday>
-
	<drinks>
<drink>Jupiler</drink>
<drink>Hoegaarden</drink>
</drinks>
-
	<contacts>
-
	<contact id="1" row-state="original">
<firstname>Lucien</firstname>
<lastname>Vandevelde</lastname>
<phone nr="+32-2-2222222"/>
<email>lv@vdvld.be</email>
</contact>
-
	<contact id="2" row-state="original">
<firstname>Joris</firstname>
<lastname>Veldweghel</lastname>
<phone nr="+32-59-595959"/>
<email>jrsvldwghl@hotmail.com</email>
</contact>
-
	<!--
 template inserted by the binding for new rows (mapping new nodes) 
-->
-
	<contact id="" row-state="new">
<firstname>fred</firstname>
<lastname>jones</lastname>
<phone nr="+44-1772-498247"/>
<email>colin@colina.demon.co.uk</email>
</contact>
</contacts>
</context>
</wrapper>
</data>

Note that the id field for the new row is an empty attribute.

This is no good - if the repeater widget requires unique ids (and note
that these if attributes are not of type ID or xs:ID as they do not
begin with a letter, but that's another issue), then why is there not
an id assigned to the new row?

If two rows were added, immediately  the ids would no longer be
unique.
And if this data file were read in again, there would be a problem.
-- 
Colin Paul Adams
Preston Lancashire

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message