I made some progress by using <namespace>. Here is what I have now. <binding> <namespace uri="http://www.w3.org/XML/1998/namespace" prefix="xml" default="none"/> <mapping name="PurchaseOrder" class="edu.vanderbilt.mis.jebus.model.PurchaseOrder"> ... </binding>
In my object model, I created a NationalizedString object which has a language code and text property. In my binding for elements that require the "xml:lang" attribute I am mapping them like so... <structure name="Name" field="name"> <value ns="http://www.w3.org/XML/1998/namespace" name="lang" field="language" style="attribute"/> <value field="text" style="text" /> </structure> Where the name field is a NationalizedString. Does this seem reasonable? Can anyone recommend a better approach? --Norm -- Norm Deane MIS Consultant Vanderbilt University (615) 322-7855 [EMAIL PROTECTED] > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Norm Deane > Sent: Monday, May 17, 2004 12:11 PM > To: [EMAIL PROTECTED] > Subject: [jibx-users] xml:lang Question > > > According to the XML 1.0 recommendation, the xml:lang > attribute applies to all child elements and attributes of the > element that is applied to. Therefor if the language for the > entire document is "en" then > > <my-doc-root xml:lang="en"></my-doc-root> > > would suffice. What is the best way in the JiBX world to > account for special attributes like xml:lang? I toyed around > with some different mappings and ran into problems when using > the ":" character in a mapping like so... > > <value name="xml:lang" field="languageCode" style="attribute" /> > > --Norm > > -- > Norm Deane > MIS Consultant > Vanderbilt University > (615) 322-7855 > [EMAIL PROTECTED] > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: SourceForge.net Broadband > Sign-up now for SourceForge Broadband and get the fastest > 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users
