Index: org/exolab/castor/xml/Marshaller.java =================================================================== --- org/exolab/castor/xml/Marshaller.java (Revision 7205) +++ org/exolab/castor/xml/Marshaller.java (Arbeitskopie) @@ -1373,6 +1373,8 @@ String path = attDesc.getLocationPath(); if (name.equals(path)) { mstate.nestedAtts[i] = null; + // TODO: Should this not be '--mstate.nestedAttcount'? Setting to zero + // sometimes prevents the subsequent attribute values to be processed mstate.nestedAttCount = 0; processAttribute(mstate.getOwner(), attDesc, atts); } @@ -1763,6 +1765,11 @@ } } + + // TODO: If element 'text' value is null and is not required then it skips attribute + // processing. I think there should be a check that if the element has attributes with + // non-null values then the attributes should be processed here instead of processing them + // later if (obj == null || (obj instanceof Enumeration && !((Enumeration)obj).hasMoreElements())) { if (elemDescriptor.isNillable() && (elemDescriptor.isRequired())) { nil = true; @@ -1921,6 +1928,9 @@ } + // TODO: Handling additional attributes at the end causes elements to be marshalled in the wrong + // order when element 'text' is null, but their attribute value is not null. Can this be fixed + // to process element attributes even when the element text value is null? //-- Handle any additional attribute locations that were //-- not handled when dealing with wrapper elements