Frank Budinsky wrote:
> Raymond is trying to write a serializer, and I presume he wants to produce 
> this:
> 
> <implementation.java ...>
> 
> If the only property on the object is "implementation" with a value that 
> is an sca:Implementation subclass, you'd get/expect this when serializing:
> 
> <implementation xsi:type="sca:JavaImplementation" ...>
> 
> which is valid, but isn't using the substitution group.

I would have expected the serializer be aware of the substitution group
and write out the element corresponding the actual value assigned to the
property.

IOW I would not have expected
  <implementation xsi:type="sca:JavaImplementation" ...>
but
  <implementation.java ...>

> 
> So it's really the "implementation.java" property that we need to 
> serialize, but the "implementation" property is a static property of the 
> Type, so it will always be there. In the Java implementation they both 
> return the same thing, but the serializer needs to know that one is just 
> derived from the other and not to serialize them both.
> 

There's only one property in question here ("implementation") - it's
just that the property supports an entire hierarchy of value types.

> More generally, I'm wondering how the C++ implementation will serialize 
> this. Does it roundtrip back to the same XML that was loaded?
> 

One would hope so :-)
--
Jeremy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to