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.

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.

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

Frank.

"Pete Robbins" <[EMAIL PROTECTED]> wrote on 06/14/2006 03:35:05 PM:

> In the C++ implementation you would only get a single property
> "implementation". It's type would be sca:JavaImplementation which is a 
sub
> type of Implemetation. I think this is correct as the schema tells us 
that
> when loading the instance document to treat " implementation.java"  as
> "implementation" so you should not see a property named 
implementation.java.
> 
> possibly...
> 
> On 14/06/06, Raymond Feng <[EMAIL PROTECTED]> wrote:
> >
> > It seems that SDO models XSD substitution group as open content. So in
> > this
> > case, we have two properties: implementation and implementation.java. 
The
> > DataObject.getXXX(Property) method works for both and returns the same
> > value. And because of this, the code doesn't know if the
> > implementation.java
> > substitutes implementation. As a result, the vaule is incorrectly 
written
> > twice into the XML stream.
> >
> > Thanks,
> > Raymond
> >
> > ----- Original Message -----
> > From: "Jeremy Boynes" <[EMAIL PROTECTED]>
> > To: < [email protected]>
> > Sent: Wednesday, June 14, 2006 9:43 AM
> > Subject: Re: Question about XSD substitution support in SDO2
> >
> >
> > > On 6/14/06, Raymond Feng < [EMAIL PROTECTED]> wrote:
> > >> By the SDO spec, the component Type (which owns the implementation
> > >> substitution group) is open and there will be two properties:
> > >>
> > >> implementation: normal property in Type.getProperties() list
> > >> implementation.java: dynamic property in
> > >> DataObject.getInstanceProperties()
> > >> list
> > >>
> > >
> > > If the type was just open then yes. I thought the intent here though
> > > was substitution so wouldn't that mean that the "implementation"
> > > property should contain an "implementation.java" sub-type instance?
> > >
> > > --
> > > Jeremy
> > >
> > > 
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> Pete


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

Reply via email to