use include instead of redefine ?

Imported from previous forum

One of the great values of XML schema technology is the ability to process it wih an XML data binding engine to create (in our case) Java classes.

The ideal is to take an XML schema as is and create a library of components that would be common to all our applications. We are close to the ideal situation but for one issue with the use of “redefine”. The issue with using redefine to include schema files is that it does not work with one of the most popular open-source XML binding engines, (Castor from exolab.org). I also tried generating Java objects from the order base schema using WebSphere Application Developer Studio’s XML binding engine, this did not work either. XML Spy supports it now but did not support redefine in 4.3.

Only when I changed the redefine’s to includes’s did both WebSphere Studio and Castor succeed in converting the the fixml-order-base-4-4 schema into Java classes.

I saw a message in the Castor email list regarding this issue and the response over a year ago was this:
"We plan to add the support for it but there is currently no work in progress on that issue.
Sorry for the inconvenience"

So this all leads me to the following questions:

  1. Can FPL replace the redefines with includes, and if any redefines need to take place, they can be done outside of the schema that is delivered by the FPL?
  2. Should I just live with having to modify the FIXML from the FPL and start reading up on XSLT? This would hopefully be temporary and eventually Castor would eventually support redefine.
  3. Would impl.xsd files only be used by applications of the schema to redefine types?

Gerry Capone

[ original email was from Jim Northey - jnorthey@lasalletech.com ]
Gerry,

We discussed this on yesterday’s FIXML Schema Working Group meeting and arrived at the following concensus.

We added the redefines to comply with the extensibility requirements of the FIX Protocol.

With that said, you raise an interesting point.

The -impl files are modified when someone wants to extend (customize) the specification. If someone (hopefully most users) intend to use the schema unaltered - they would not modify the impl files.

With this in mind, there is some merit to converting the redefines to includes. Should counterparties choose to extend the specification they can change the include to redefine as part of this effort. This has the added communication benefit - in that the presence of a "redefine" means that the user has extended / restricted the FIXML schema, absence of "redefine" would indicate the use of the schema "as is".

We will need to test this and run the idea past some folks one more time - but I think it is worth consideration.

Anyone else have any thoughts on this?

> One of the great values of XML schema technology is the ability to process it wih an XML data binding engine to create (in our case) Java classes.
>
> The ideal is to take an XML schema as is and create a library of components that would be common to all our applications. We are close to the ideal situation but for one issue with the use of “redefine”. The issue with using redefine to include schema files is that it does not work with one of the most popular open-source XML binding engines, (Castor from exolab.org). I also tried generating Java objects from the order base schema using WebSphere Application Developer Studio’s XML binding engine, this did not work either. XML Spy supports it now but did not support redefine in 4.3.
>
> Only when I changed the redefine’s to includes’s did both WebSphere Studio and Castor succeed in converting the the fixml-order-base-4-4 schema into Java classes.
>
> I saw a message in the Castor email list regarding this issue and the response over a year ago was this:
> “We plan to add the support for it but there is currently no work in progress on that issue.
> Sorry for the inconvenience”
>
> So this all leads me to the following questions:
>
> 1. Can FPL replace the redefines with includes, and if any redefines need to take place, they can be done outside of the schema that is delivered by the FPL?
> 2. Should I just live with having to modify the FIXML from the FPL and start reading up on XSLT? This would hopefully be temporary and eventually Castor would eventually support redefine.
> 3. Would impl.xsd files only be used by applications of the schema to redefine types?
>
>
> Gerry Capone
>

[ original email was from Jim Northey - jnorthey@lasalletech.com ]
Draft#2 has the redefines changed to includes. The only time someone will need to modify the impl files and change the include to a redefine is in the event that they want to extend/restrict the standard FIXML definition.

> Gerry,
>
> We discussed this on yesterday’s FIXML Schema Working Group meeting and arrived at the following concensus.
>
> We added the redefines to comply with the extensibility requirements of the FIX Protocol.
>
> With that said, you raise an interesting point.
>
> The -impl files are modified when someone wants to extend (customize) the specification. If someone (hopefully most users) intend to use the schema unaltered - they would not modify the impl files.
>
> With this in mind, there is some merit to converting the redefines to includes. Should counterparties choose to extend the specification they can change the include to redefine as part of this effort. This has the added communication benefit - in that the presence of a “redefine” means that the user has extended / restricted the FIXML schema, absence of “redefine” would indicate the use of the schema “as is”.
>
> We will need to test this and run the idea past some folks one more time - but I think it is worth consideration.
>
> Anyone else have any thoughts on this?
>
> > One of the great values of XML schema technology is the ability to process it wih an XML data binding engine to create (in our case) Java classes.
> >
> > The ideal is to take an XML schema as is and create a library of components that would be common to all our applications. We are close to the ideal situation but for one issue with the use of “redefine”. The issue with using redefine to include schema files is that it does not work with one of the most popular open-source XML binding engines, (Castor from exolab.org). I also tried generating Java objects from the order base schema using WebSphere Application Developer Studio’s XML binding engine, this did not work either. XML Spy supports it now but did not support redefine in 4.3.
> >
> > Only when I changed the redefine’s to includes’s did both WebSphere Studio and Castor succeed in converting the the fixml-order-base-4-4 schema into Java classes.
> >
> > I saw a message in the Castor email list regarding this issue and the response over a year ago was this:
> > “We plan to add the support for it but there is currently no work in progress on that issue.
> > Sorry for the inconvenience”
> >
> > So this all leads me to the following questions:
> >
> > 1. Can FPL replace the redefines with includes, and if any redefines need to take place, they can be done outside of the schema that is delivered by the FPL?
> > 2. Should I just live with having to modify the FIXML from the FPL and start reading up on XSLT? This would hopefully be temporary and eventually Castor would eventually support redefine.
> > 3. Would impl.xsd files only be used by applications of the schema to redefine types?
> >
> >
> > Gerry Capone
> >
>