Hi Kevin,

"Ruland, Kevin S [ITS]" wrote:
> 
> Keith,
> 
> Thanks for the info.
> 
> Could you give me pointers in how to modify & build from 
> org/exolab/castor/mapping/mapping.xsd?  Specifically my questions are:
> 
> 1) there is no ant task to use the SourceGenerator and regenerate the 
> com.exolab.castor.mapping.xml package.  I ran it by hand, but noticed way to many 
> changes between the newly generated source and the previous source.  Most of these 
> changes were, I believe, because the source in the distribution was generated with 
> Castor 0.8.12.  Should I use that version when I try my experiments.


We run it by hand, but you also need to use the binding file.

Usually, what I do, is copy the definition I've changed to a new schema
stub and only generate the sources for that piece (for example just the
bind-xml definition) into a temp directory and then I copy over the
newly created source files. This way, if anything goes wrong, I know the
scope of the problem.


> 
> 2) Are the mapping.xsd and mapping.dtd files manually reconciled or is there some 
> way you generate one from the other?

They are manually reconciled. The mapping.xsd is the master file of
course, and mapping.dtd is manually updated anytime the mapping.xsd is
updated. 

> 
> 3) I don't understand how to modify the mapping.xsd and use a property to allow the 
> functionality to be optionally included.  Am I missing something.

Well, if you're adding a new item to the mapping file, you can make it
optional by using minOccurs="0" for an element, and use="optional" for
an attribute.

If you're trying to make some sort of behavior in the Marshaller or
Unmarshaller optional, you can add a new property in the
Configuration/LocalConfiguration classes, and then access that property
from the Marshaller/Unmarshaller to determine the proper behavior.

There are a number of ways to make some sort of new functionality
optional, you just need to find the best way to do it for your
particular case.

--Keith

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to