On Thu, 2004-06-03 at 04:10, Dennis Sosnoski wrote:
> I think the problem here is that you've got the <mapping 
> name="DataStore"... ordered="false"> and then a child structure that 
> doesn't have an associated element name:
> 
>         <structure field="sourceRef" 
> class="com.syncml.framework.core.SourceRef" usage="optional">
>             <value name="SourceRef" field="value" usage="optional"/>
>         </structure>

IMHO, this part of problem belongs to the SYNC4J part where it is
used. On that mailinglist I have sent a similar patch as you have
suggested here which I believe fixes it. The only problem then is
that you have to use/built from sources your server.

> 
> I can understand what you want this to do, but I don't think the JiBX 
> code generation can. It really should give an error on this, since the 
> way it is now it expects to have an element name for each child 
> <structure> in an unordered list.

I agree, JIBX handles it correctly here. Actualy, it is my understanding
from the standards - SyncML 1.1 - that the XML used in SyncML (that is
what we are talking about) has the order fixed.
So is the binding/mapping in the Sync4J package. Unfortenately, some
SyncML client do not sent the correct order. Or send the XML with 
a DTD version that is 1.0 and (I am not sure) does maybe not demand the
given sequence.

> 
> There are a couple of ways to handle this, but I'd think the simplest 
> would be to change this definition to:
> 
>   <structure name="SourceRef" field="sourceRef" usage="optional">
>     <value field="value" style="text"/>
>   </structure>
> 
> Your current binding also has a number of attributes that aren't 
> appropriate for the elements (as with the "class" attribute on a 
> <structure> element). This isn't causing any problems directly, but it 
> probably makes it harder to understand when something is going wrong. 
> You might want to try validating your binding against the binding.xsd 
> schema supplied in the /docs directory.

Be aware that the message presented here is slightly modified (filtered)
before it goes into the JIBX part to create all the JAVA classes
representing the XML.

> 
> Your next question is likely to be how to do this. :-) Any volunteers to 
> add a snip in the Wiki about turning on binding file schema validation 
> for editing?
> 
>   - Dennis
> 
> Falk Langhammer wrote:
> 
> >however, I always get such errors:
> >org.jibx.runtime.JiBXException: Expected end tag, found start 
> >tag"{syncml:devinf}SourceRef"
> >
> >This means that BEFORE "<SourceRef xmlns='syncml:devinf' ...>..." You have 
> >ommitted an element in the XML document which You have a (non-optional) mapping 
> >in your binding.xml.
> >
> >I.e., Your data XML lacks a mandatory element.
> >
> >
> >Xin Liu wrote:
> >
> >  
> >
> >>Hi, all:
> >>  I used jibx to parse a xml document (syncml document). Below is the 
> >>document
> >>    
> >>
> >
> >Dont expect us to read your XML files...
> >
> >Regards,
> >Falk
> >  
> >



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to