The XML produced by Castor using my mapping looks like this::

    <?xml version="1.0" encoding="UTF-8"?>
    <Fall xmlns="ns:fall">
      <Klaeger ... />
      <Beklagter ... />
      <p:NatuerlichePerson xmlns:p="ns:person" ... />
      <p:NatuerlichePerson xmlns:p="ns:person" ... />
      <Aktenzeichen>2006-1123114-X</Aktenzeichen>
    </Fall>

The element ``Fall/Aktenzeichen`` unexpectedly appears last in
``Fall`` despite the fact that it is defined *first* in the
corresponding ``class`` of the mapping::

    <m:class name="dataobj.Fall" identity="aktenzeichen">
      <m:map-to  ns-uri="ns:fall" xml="Fall"/>

      <m:field name="aktenzeichen" type="string">
        <m:bind-xml name="Aktenzeichen" node="element"/>
      </m:field>

      <m:field name="klaeger" type="dataobj.Person">
        <m:bind-xml location="Klaeger" auto-naming="deriveByClass"
xmlns="ns:fall"/>
        <!-- by setting the default namespace we get Klaeger to be of
that namespace -->
      </m:field>
      <m:field name="angeklagter" type="dataobj.Person">
        <m:bind-xml location="Beklagter" auto-naming="deriveByClass"
xmlns="ns:fall"/>
      </m:field>
      <m:field name="sonstige" collection="collection"
type="dataobj.Person">
        <m:bind-xml auto-naming="deriveByClass"/>
      </m:field>
    </m:class>

Could is caused by the fact that I've got Aktenzeichen marked as
``identity`` for the Fall, but I don't understand why this should be
the case.  It looks like a bug to me.  Is there a work-around?

// Ben


-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to