Hi Dennis,

If I replace those xml strings inside <Meta> tags, I'm still receiving the old 
error...


Expected "{http://protocol.columboid.com/syncml/representation}VerDTD"; end tag, 
found "{http://protocol.columboid.com/syncml/representation}VerDTD"; start tag 
(line 1, col 151)




Thanks,
Peter Wu



From: pete...@hotmail.com
To: jibx-users@lists.sourceforge.net
Subject: RE: [jibx-users] jibx can't find the right tag
Date: Tue, 13 Oct 2009 10:52:34 -0400








Hi Dennis,

I tried the 1.2.2-SNAPSHOT and it fixed the original problem I reported. Thanks.

However, I found a new issue. Please consider the following xsd.


  <!-- The Meta content would be something such as: <Meta> <Type 
xmlns='syncml:metinf'>text/calendar</Type> <Format 
xmlns='syncml:metinf'>xml</Format> </Meta> -->
  <xs:element name="Meta" type="xs:string"/>


The Meta tag accepts xs:string. However, the xs:string it's going to accept is 
actually a string of xml tags. This seems to confuse jibx as it is expecting a 
non-xml string. Here is an example:

<Meta>
     <MaxMsgSize xmlns='syncml:metinf'>2700</MaxMsgSize>
</Meta>


When jibx looks at this xml content, it will throw an exception complaining 
about missing </Meta> tag as it detects <MaxMsgSize> right after <Meta>. Is 
there a way to work around this problem? Thanks!



Thanks,
Peter Wu



> Date: Sat, 10 Oct 2009 12:07:03 +1300
> From: d...@sosnoski.com
> To: jibx-users@lists.sourceforge.net
> Subject: Re: [jibx-users] jibx can't find the right tag
> 
> Peter Wu wrote:
> > ...
> >
> >   <mapping class="com.columboid.protocol.syncml.representation.VerDTD"
> > name="VerDTD">
> >     <value style="element" name="VerDTD" get-method="getVerDTD"
> > set-method="setVerDTD"/>
> >   </mapping>
> >
> >
> > And actually, this mapping was generated by CodeGen with default settings
> > from an XSD. 
> >   
> 
> Ah, that would explain it then. :-)
> 
> The generated <mapping> is wrong, due to a bug in CodeGen which I 
> actually fixed yesterday (http://jira.codehaus.org/browse/JIBX-309). The 
> bug is actually much more serious than the initial statement suggested, 
> applying to any global element definition using a simple type reference. 
> It looks like the SyncML schema must use this type of definition.
> 
> So here's three possible solutions:
> 
>    1. Download the latest jibx-*-1.2.2SNAPSHOT jars from the Maven
>       repository at http://www.jibx.org/maven/jibx/jars and use those.
>    2. Wait another 2-3 days and I'll post a pre-release trial build for
>       1.2.2, which I'm planning to do because there are so many changes
>       from 1.2.1 (I'll email this list when I post it, and will have it
>       up for about a week before the official 1.2.2 release)
>    3. Use 1.2.1, but customize the code generation - what you'd want to
>       do is use generate-all="false" and prefer-inline="true", then
>       specify the specific top-level elements you want to generate with
>       includes="SyncHdr name2 name3 ..." (see
>       http://jibx.sourceforge.net/fromschema/codegen-customs.html for
>       some discussion of customizations, or
>       http://www.ibm.com/developerworks/java/tutorials/j-jibx2/)
> 
> 3 is more effort, but is probably what you're going to want to do in the 
> long run because it's going to be painful to work with a separate class 
> for every single value in the XML document structure.
> 
>   - Dennis
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
                                          
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to