>  >  Yes, any view with no sofa should have it's FS added to the
>  >  _InitialView index.
>
>  Ok.  A related question -- will an xmi file ever contain more than one
>  view with the same sofa (or with no sofa)?  E.g., something like
>  this:?
>    <cas:View sofa="1" members="2 3 4"/>
>    <cas:View sofa="1" members="5 6 7"/>

Should be only one cas:View per sofa. Also, after checking, the
current XMI serialization code does not create a view for the base
CAS, so there should be at most only one view with no Sofa.


>  >  "size" is a feature of an array FS. I believe the number of data
>  >  elements should always match the specified size. Do you have a counter
>  >  example?
>
>  It seems odd to say that it's a "feature" of an array FS -- that
>  implies to me that something like the following should work:
>
>    my_array_fs.getIntValue("size")
>
>  Presumably that's not what you mean.  I don't have any examples of
>  xcas files where the XML element for an array has a size attribute
>  that is not equal to the number of children it has; but it was natural
>  to wonder if such a case would be considered valid xcas (in which case
>  I need to know how to interpret it) or invalid xcas (in which case
>  it's redundant information, and I can ignore the size attribute).

An array is an FS, but as with the SofaFS, it has features not
accessible via normal feature getters and setters. As for ignoring the
size feature, I'm not totally sure that a string array with null
strings are all represented in XMI/XCAS. It would be safest on
deserialization to create an array in the Python CAS of the given
size, with all elements initialized to 0 or null as appropriate, and
then fill the array with the values that are there.

Regards,
Eddie

Reply via email to