The xml namespace is predefined, so you shouldn't need to define it again. Aside from that, I'd think your approach is fine. I'm not sure what else you're looking for, though. If you want to apply the inheritance of xml:lang as defined by the specification that's really an application-level issue.

 - Dennis

Norm Deane wrote:

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






-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to