On 12/7/06, Caroline Maynard <[EMAIL PROTECTED]> wrote:
On 07/12/06, Pete Robbins <[EMAIL PROTECTED]> wrote: > > > Do you use the Sequence API to add the animals in this case? I suspect not > and this highlights a problem in our implementation where, for a Sequenced > DataObject, setting of Properties using the DataObject::setXXX methods > should delegate to the Sequence API but do not, so they do not appear in > the > sequence. You're correct, I'm not using the Sequence APIs at all, the only difference is that in one case the DataObject is sequenced and in the other it is not. If we make the change to delegate the setting of the property so that any > setXXX on a sequenced SDO will appear in the sequence there is another > question: Should properties that are defined from an XML Schema as > "attributes" be included in the Sequence? I think the answer is NO as that > is what wouild be intended by the schema. I agree. -- Caroline On the last point. It depends on what we think a sequence is...
1/ A sequence of all of the elements and text that appear inside of a particular element in an XML document (this excludes attributes as you suggest) 2/ Just the ordered collection of settings disregarding the fact that it will, at some point in the future, become and XML document If we want SDO to look and feel like an XML document then the answer is 1/. If we want SDO to be an abstract data interface then the answer is 2/. I think the SDO philosophy to date goes with 2/ If we were to go with 1 we should raise it with the spec people and also have a convenient way of telling whether a property is an attribute so that alongside getting the sequence of properties (elements and text) from a data object we can go get all the attributes also. Simon
