Hi Ruben,

I think this is handled quite nicely by XmlBeans, within the context set
by the XMLSchema spec. Assuming you have a backwards-compatible Schema
on the server and an older version of that on the client you can either
have extra elements sent by the server, which will of course be
inaccessible via the generated APIs that the client uses, but they will
be accessible by the XmlCursor API. Or you could have restriction, when
the server will stop sending elements/attributes that were optional
anyway. The client still works. On the server, it's a little trickier
but still works and the server may even choose to support clients with
older Schemas specifically, for instance by using XmlCursor to get to
information that was removed from the most current version of the Schema
using restriction, but the clients are still sending.

Onto the problem of "discovery", XmlBeans saves Schema information along
with generated classes in the jar. So if a client will call "validate"
for instance, it will validate against the version of Schema that the
client has, even though the document may be generated using a different
version of the Schema. I am not sure I understand what you mean by
"Ignore everything you know!": as long as the client uses at runtime the
same version of the Schema that the client code was written against, the
server does the same, the two Schemas are backwards-compatible and the
message on the wire is "pure" XML if you will, then everything should
hang together.

Hope this helps,
Radu

-----Original Message-----
From: Ruben Verlinden [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 05, 2006 9:05 AM
To: user@xmlbeans.apache.org
Subject: Re: XML Schema evolution forward and backwards compatibility

On Thu, 2006-10-05 at 08:33 -0700, Martin Wegner wrote:
> 
> The issue has less to do with XMLBeans and more with the XML Schema 
> standard itself.  It is hard to do.  I would suggest you start reading
> here:
> 
> 
> http://www.pacificspirit.com/Authoring/Compatibility/ProvidingCompatib
> leSchemaEvolution.html
> 
I already had a look at this article. The problem is how to support XML
schema discovery (which is the XML schema for a certain document) and
doing the projection if possible with XMLBeans.

kind regards,
Ruben


> ----- Original Message ----
> From: Ruben Verlinden <[EMAIL PROTECTED]>
> To: user@xmlbeans.apache.org
> Sent: Wednesday, October 4, 2006 10:42:35 AM
> Subject: XML Schema evolution forward and backwards compatibility
> 
> Hello,
> I am new to using XMLBeans and I wonder if somebody can provide me 
> with some insights on supporting backward/forward compatibility after 
> the XML Schema for a certain document type evolves using XMLBeans.
>         
> The general idea was to have clients which only support an older 
> version of the schema than the documents sent by the server to do a 
> projection of the XML document to their known schema. Which comes down

> to: Ignore everything you know! Possibly a must not ignore could be 
> built into some elements later on.
>         
> The server should also be able to receive XML documents that follow an

> older schema than the one used on the server. When receiving such a 
> XML document the server should parse it an decide if it can find 
> enough information in the document or not.
>         
>         
> Can anyone provide me some insight on how to do this using XMLBeans?
> Or
> if XMLBeans is even suited for this kind of task? 
>         
>         
> kind regards,
> Ruben Verlinden
> 
> 
> ---------------------------------------------------------------------
> 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]

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

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

Reply via email to