Hi Josh,

The default conversions listed on the page you linked are just that - 
defaults, which you don't need to specify. I don't understand why you'd 
be getting a namespace error if you try to reference them explicitly, 
though. Unless you're perhaps using the old form of the names, which had 
':' characters rather than '.' characters as separators? The names were 
changed around the time of JiBX 1.1 in order to be usable with 
namespaces. I do test references to some of the default formats as part 
of the build tests, so this appears to be working.

  - Dennis

Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Josh wrote:
> Dennis,
>  
> Thanks for the reply.  If my java object uses a java.util.Date or 
> java.sql.Timestamp, it looks like I have to explicitly specify the 
> format.  When I try using the conventions mentioned here ( 
> http://jibx.sourceforge.net/details/conversions.html), I receive a 
> namespace error.  How do I set up my mapping file so that I can uses 
> these format labels?
>  
> Also, will JiBX automatically look at the target data type (ie 
> java.util.Date) and try to automatically convert an xsd:dateTime to it?
>  
> Joshua
>
>  
> On 3/27/07, *Dennis Sosnoski* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi Josh,
>
>     The format attribute is only used when you're using a non-default
>     conversion for the value type. The section of the binding tutorial on
>     serializer/deserializers mentions this:
>     http://jibx.sourceforge.net/tutorial/binding-extend.html#serdeser
>     ("The
>     third way of defining custom conversions...). There's generally
>     not any
>     reason to use this unless you are using different text representations
>     for the same types of values within the XML (so if you wanted to
>     use the
>     dollars-and-cents conversion in the Figure 20 tutorial example for
>     some
>     of your int values, and didn't want to write out serializer="..." and
>     deserializer="..." in each place where this was done, you could
>     instead
>     give it a name and just refer to it using format="...").
>
>     - Dennis
>
>     Dennis M. Sosnoski
>     SOA and Web Services in Java
>     Training and Consulting
>     http://www.sosnoski.com - http://www.sosnoski.co.nz
>     <http://www.sosnoski.co.nz>
>     Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
>
>
>
>     Josh wrote:
>     > Hello,
>     >
>     > Looking through the examples, it is unclear when the "format"
>     > attribute is needed on the <value> element.  For example, in one of
>     > the online examples, zip is mapped to an Integer and no "format"
>     > attribute was required.  When would a format attribute be required?
>     >
>     > Regards,
>     >
>     > Josh
>     >
>     ------------------------------------------------------------------------
>
>     >
>     >
>     -------------------------------------------------------------------------
>     > Take Surveys. Earn Cash. Influence the Future of IT
>     > Join SourceForge.net's Techsay panel and you'll get the chance
>     to share your
>     > opinions on IT & business topics through brief surveys-and earn cash
>     >
>     http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>     
> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > jibx-users mailing list
>     > jibx-users@lists.sourceforge.net
>     <mailto:jibx-users@lists.sourceforge.net>
>     > https://lists.sourceforge.net/lists/listinfo/jibx-users
>     >
>
>     -------------------------------------------------------------------------
>
>     Take Surveys. Earn Cash. Influence the Future of IT
>     Join SourceForge.net's Techsay panel and you'll get the chance to
>     share your
>     opinions on IT & business topics through brief surveys-and earn cash
>     http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>     
> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
>     _______________________________________________
>     jibx-users mailing list
>     jibx-users@lists.sourceforge.net
>     <mailto:jibx-users@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/jibx-users
>     <https://lists.sourceforge.net/lists/listinfo/jibx-users>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ------------------------------------------------------------------------
>
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>   

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to