On Thu, 2006-02-02 at 12:39 -0600, Joseph Larson wrote:
> Can someone point me to a full description of a .betwixt file?  There  
> is information scattered throughout the various betwixt documents,  
> but I have been unable to find a complete description of the contents.

there is a DTD:

http://svn.apache.org/repos/asf/jakarta/commons/proper/betwixt/trunk/src/resources/dotbetwixt.dtd

but it would great if all the information was collated into one
document.

any volunteers?

> At this point, I'm trying to properly define an element that is a  
> container.  Specifically, the class in question contains:
> 
>       private ArrayList<PropertyImpl> properties = new ArrayList<  
> PropertyImpl >();
>       public ArrayList< PropertyImpl >        getProperties() { return 
> properties; }
>       public void addProperty(PropertyImpl property)
>       {
>               properties.add(property);
>       }
> 
> The XML I'm reading has a format I can't change, so I need to get  
> betwixt to read it without fixing some shortcomings in the design.   
> They use the keyword "property" for this field.
> 
> I haven't found an example that shows how to define an element like  
> this.  That is, I need to define a container where the name in the  
> XML does not match the names in the implementing class, and the adder  
> method is being used.

the first thing that i'd strongly recommend is checking out the latest
code from subversion and building a version of that: a lot of
improvements have been made since the last release.

flexible mapping is the strength of betwixt so should be able to do what
you need. i'm not sure i completely understand what you want to do (if i
have it wrong, please give an example of the xml).

you probably want to use a dot betwixt file for this. you need to
specify the mapping using a element element:

<element name='XYZ' property='ABC' adder='DEF'/> 

this will map an xml element with tag <XZY> to property named ABC with
adder DEF.

hope this helps

- robert


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

Reply via email to