Torsten,

Looks like a bug with container="true" when dealing with arrays, since
the only thing that should do is remove the "<coordinates>" element, but
the individual "<float>" elements should still be there.

Out of curiosity, what happens if you set node="text"?

--Keith

Mapping the array to node="text" <field name="coordinates" type="float" collection="array" container="true"> <bind-xml name="coordinates" node="text" /> </field>

results in

<VGeometry>[EMAIL PROTECTED]</VGeometry>

It doesn't matter if the container attribute is set to true or false. The
result is the same.

If I set node="attribute" I got something similar:
<VGeometry
coordinates="[EMAIL PROTECTED]">
</VGeometry>


Hope that this issue will be adressed in the future, Torsten


PS: By the way, I also tried to use the list type in a schema: <xsd:simpleType name="listOfFloats"> <xsd:list itemType="xsd:float"/> </xsd:simpleType>

and again, as Tony said, it results in something like I got with my
mapping file:
<VGeometry><coordinates><float>401898.0</float><float>723416.0</float><float>...



Torsten Heinen wrote:

How do I marshal a float array into a list?

My mapping file looks like this:
<class name="vshape.VGeometry">
<field name="coordinates" type="float" collection="array" container="true">
<bind-xml name="coordinates" node="element" />
</field>
</class>


Here is the XML output:
<?xml version="1.0" encoding="UTF-8"?>
<VGeometry>401898.0723416.050.964954402299.0723 ...</VGeometry>

So, the white-space is missing between the float values. Any ideas why?

Alternatively I can set the container="false" attribute, but then the XML
output look like this:
<?xml version="1.0" encoding="UTF-8"?>
<VGeometry><coordinates><float>401898.0</float><float>723416.0</float><float>...
This is simply to much overhead when dealing with thousands of values.


Does anyone know how to get something like this???
<?xml version="1.0" encoding="UTF-8"?>
<VGeometry><coordinates>401898.0 723416.0 50.3 ....</coordinates></VGeometry>


Any help is welcome...
Torsten

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-user



-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user

Reply via email to