Hi Jason

The following is a working binding file I use to provide a Castor generated class with a superclass. I created it using the Oxygen XML editor driven by the file binding.xsd which is delivered with Castor: this explains the "xsi" stuff in the
"binding" element, which is only relevant if you are me :-)

<?xml version="1.0" encoding="UTF-8"?>
<binding xmlns="http://www.castor.org/SourceGenerator/Binding";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://www.castor.org/SourceGenerator/Binding
file:/Users/steve/Documents/eclipse/castor-vimia/org/exolab/ castor/builder/binding/binding.xsd"
    defaultBindingType="type">

    <complexTypeBinding name="mBaseType">
        <java-class xmlns="model">
            <extends>com.vimia.mesh.domain.MAbstractRoot</extends>
        </java-class>
    </complexTypeBinding>

</binding>

A few words of explanation: mBaseType is a complexType in my XML schema
which I wanted to provide with a superclass that I had written by hand: that class
is "MAbstractRoot".

Looking now at the "xmlns" attribute on the "java-class" element, I suspect I should
have a namespace in there, but it works OK for me like.

So there you have a working binding file. Whether it does anything remotely like
what you need to I leave as an exercise for the reader...

I feed the binding file to SourceGen via a field in a form of the Eclipse plugin. I
presume SourceGen itself has a command line switch to do this too.

Steve

On 25 Aug 2005, at 16:43, Green, Jason M. wrote:

Hey all,
I sent this post out before, but I didn't get any responses. I am looking for help on the binding file. I tend to understand things like this if I have a direct example to work with. For example, I am getting a warning when I run the source generator. If I had one example of how ot fix it, I could do the same for all issues ihave. Anyway, here is the warning I get. Can someone tell me how I would set up the binding file?

Warning: A class name generation conflict has occured between element 'complexType:ApprovalType/signature' and element '/ defensiveTask/properties/validation/signature'. Please use a Binding file to solve this problem.Continue anyway [not recommended] (y|n|?)

Jason Green



-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to